Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overwriting userRes headers when using userResHeaderDecorator #548

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fabb
Copy link

@fabb fabb commented Aug 17, 2024

fixes #547

previously, the proxy response would overwrite same-named headers without the possibility to fix it in userResHeaderDecorator. This is problematic e.g. for applications that use set-cookie for auth cookies set in a middleware before the proxy middleware, and where the proxy response overwrites this header.

this change is backwards-compatible and keeps overwriting headers, but when using userResHeaderDecorator, the original headers can be read from userRes and returned to the caller.

@fabb fabb changed the title avoid overwriting userRes headers when using userResHeaderDecorator Fix overwriting userRes headers when using userResHeaderDecorator Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

copyProxyResHeadersToUserRes overwrites Set-Cookie headers that have already been set by previous middleware
1 participant