Hi Team.
I’m currently deep-diving into tyk golang custom plugins
Now, I have a question about custom plugins and body transform
1) Execution order of custom plugins after upstream url response returned.
I found that there’s 5 types of custom plugins and following is the execution order
pre → auth_check → post_auth_check → post → response
There’s more detailed execution order before post custom plugins.
https://tyk.io/docs/concepts/middleware-execution-order/
But I couldn’t find the execution order after upstream url response returned.
could you share more detailed execution order and let me know execution order between body transform(response body) and response custom plugins?
Can I execute response plugin before body transform? Because in my case, there’s gzip data will be returned from upstream service, so i want to decompress before body transform. if there’s an another option, please let me know.
2) Can I add more than 1 body transformation and custom plugins?
Regarding custom plugins, it seems array type is configured, so i can add more than 1 custom plugins. Is it possible to do like below. If so, How will it work (especially execution order) ?
"custom_middleware": {
"pre": [
{
"name": "Test",
"path": "/plugin-source/plugin_v4.3.1_linux_amd64.so",
"require_session": false,
"raw_body_only": false
},
{
"name": "Test2",
"path": "/plugin-source/plugin_v4.3.1_linux_amd64.so",
"require_session": false,
"raw_body_only": false
}
],
"post": [],
"post_key_auth": [],
"auth_check": {
"name": "",
"path": "",
"require_session": false,
"raw_body_only": false
},
"response": [],
"driver": "goplugin",
"id_extractor": {
"extract_from": "",
"extract_with": "",
"extractor_config": {}
}
},
Also About Body Transform for response body, can i add more than 1 ?
https://tyk.io/docs/advanced-configuration/transform-traffic/response-body/
Thanks for your help in advance.