Replies: 3 comments 2 replies
-
@MekelCon You need to unzip the body from your plugin. No other place you could place the unzip logic. Another option is clearing the |
Beta Was this translation helpful? Give feedback.
-
Thank you all for you reply ! |
Beta Was this translation helpful? Give feedback.
-
Hello,
i wrote a plugin to tranform request from xml -> json and the response from json -> xml
Here is the code and it is working, add an xml-to-json.lua :
As i use a 3rd party lib i had to modify the rockspec
And enable the plugin in the config.yaml.
It works well, I just had one issue : My backend after Apisix is answering gzip encoded content.
So before doing the transformation json -> xml , I had to do :
My question is : where is the right place to manage well this Gzip encoded content, i believe for other plugin, like logger or response-rewrite we will have gzip. So it won't be possible to log or tranform the body.
Should I make this logic of unGzip and reGzip more global in a pull request ?
Beta Was this translation helpful? Give feedback.
All reactions