PGBI/kong-dashboard

Request Transformer BUG?

leafxixi opened this issue · 0 comments

Issue summary

kong-dashboard can not add a request transformer plugin with some values correctly.
I want to know how to use kong-dashboard add the plugin correctly.

my command:
curl -X POST http://kong:8001/apis/testMap/plugins
--data "name=request-transformer"
--data "config.add.querystring[1]=position:121.287689,31.234527"
--data "config.add.querystring[2]=name:park"
--data "config.add.querystring[3]=src:mypage"
--data "config.add.querystring[4]=coordinate:gaode"
--data "config.add.querystring[5]=callnative:0"

the position value contains a ,
and kong give me the feedback:
{"created_at":1519796999000,"config":{"remove":{"querystring":{},"headers":{},"body":{}},"add":{"querystring":["coordinate:gaode","src:mypage","callnative:0","name:park","position:121.287689,31.234527"],"headers":{},"body":{}},"append":{"querystring":{},"headers":{},"body":{}},"replace":{"querystring":{},"headers":{},"body":{}},"rename":{"querystring":{},"headers":{},"body":{}}},"id":"236a0033-7310-4046-b659-e047fff63a1b","name":"request-transformer","api_id":"2344e300-8a8b-414d-85ed-ad2bfda7dac0","enabled":true}

but when i use kong-dashboard added this plugin,it turns into:
{"created_at":1519796999000,"config":{"remove":{"querystring":{},"headers":{},"body":{}},"add":{"querystring":["coordinate:gaode","src:mypage","callnative:0","name:park","position:121.287689","31.234527"],"headers":{},"body":{}},"append":{"querystring":{},"headers":{},"body":{}},"replace":{"querystring":{},"headers":{},"body":{}},"rename":{"querystring":{},"headers":{},"body":{}}},"id":"236a0033-7310-4046-b659-e047fff63a1b","enabled":true,"api_id":"2344e300-8a8b-414d-85ed-ad2bfda7dac0","name":"request-transformer"}

Your environment

  • Kong version = 0.12.x
  • Kong Dashboard version = 3.x.x (Kong Dashboard versions before 3.0.0 aren't supported anymore)
  • docker version = latest