feat: Add mergeCookies option#1318
feat: Add mergeCookies option#1318RidgeA wants to merge 1 commit intohttp-party:masterfrom RidgeA:feat/merge_set-cookie_header
mergeCookies option#1318Conversation
`mergeCookie` options allows to merge `set-cookie` header form passed request object and from target
|
Hi! |
|
Hi @RidgeA I'm helping to get things moving on this project again, and this looks like a good enough feature to consider. We'll be mapping out the next release and I'll make sure to get this on the radar. Thanks! |
|
@jsmylnycky wow, glad to hear :-) |
|
@RidgeA If you rebase from master, that should get it through CI. Some things got screwed up due to the org change. |
|
@jsmylnycky I will, np. |
|
@RidgeA Whichever you're most comfortable with...either fork and PR into it, or just clone this repository directly, checkout a new branch, and submit a PR against master. If you don't get around to it, I can still mark this for a future release and put it in myself with your changed files as a reference. |
|
@jaggernoth I created a new PR - #1375 |
mergeCookieoptions allow to mergeset-cookieheader form passed request object and from a target responseTest added.
Documentation updated.
Use Case:
In the project, I'm working on currently, we are using
Express-Gateway(https://github.com/ExpressGateway/express-gateway) as a single entry point for a set of microservices.Express-Gatewayuseshttp-proxywhen proxeing requests to a destination service.In the gateway we have to setup a cookie with CSRF token.
But some endpoints of our microservices setups it's own cookies and in this case all cookies, that has been setuped in gateway wipes out by cookies from a microservice response.
Raw example:
Curl:
By this pull-request I want to add one more option that will instruct proxy-server to merge
set-cookieheader instead of overwriting it.Existing behaviour remains the same.