Skip to content

copyProxyResHeadersToUserRes overwrites Set-Cookie headers that have already been set by previous middleware #547

@fabb

Description

@fabb

We have some middlewares before the proxy middleware to handle setting cookies (like authentication and others).
We set cookies like this in previous middlewares: res.cookie('name', 'value').

Responses that are proxies do not contain these Set-Cookie headers though. Other headers seem to pass fine.

We do not use userResHeaderDecorator.

express-http-proxy should not remove any Set-Cookie headers that have already been set on the response object.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions