Closed smahdis closed 2 years ago
I am using sequential in krakend.
I want to modify the header in first backend (for example add a new key/value to header) and then use this newly added header in the second backend.
Is that possible?
Currently I can modify the header in the first backed but the second backend doesn't see the affected header.
"backend": [ { "host": [ "http://ams_core:7086" ], "url_pattern": "/api/core/validation", "method": "GET", "extra_config": { "github.com/devopsfaith/krakend-lua/proxy/backend": { "post": "print('Lua proxy ....!'); local r = response.load(); local responseData = r:data() r:headers('Account_id', responseData:get('Account_id'));", "live": true, "skip_next": false } } }, { "host": [ "http://ams_core:7086" ], "url_pattern": "/api/core/menus", "method": "GET" } ],
the subrequests created by the sequential proxy do not access or copy headers from responses.
if you need that behavior, you can make the first request from the lua script itself or create a plugin
I am using sequential in krakend.
I want to modify the header in first backend (for example add a new key/value to header) and then use this newly added header in the second backend.
Is that possible?
Currently I can modify the header in the first backed but the second backend doesn't see the affected header.