when use apisix response-writer plugin,i find some problem like this: when use 
mutiply plugin,the message/code response from apisix will not very friendly 
when i want to modify this content,so why not to supply jsonArray to this 
plugin,something like this:


"response-rewrite": [{"body": "{\"code\":\"ok\",\"message\":\"new 
json body\"}",
"headers": {"X-Server-id": 3,
"X-Server-status": "on",
"X-Server-balancer_addr": "$balancer_ip:$balancer_port"

},
"vars": [["status",
"==",
"200"

]

]

},
{"body": "{\"code\":\"error\",\"message\":\"request limit\"}",
"headers": {"X-Server-id": 3,
"X-Server-status": "on",
"X-Server-balancer_addr": "$balancer_ip:$balancer_port"

},
"vars": [["status",
"==",
"502"

]

]

}

]
 

Reply via email to