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

Proxy seems to omit a certain header from the response #553

Open
eggplantzzz opened this issue Oct 7, 2024 · 0 comments
Open

Proxy seems to omit a certain header from the response #553

eggplantzzz opened this issue Oct 7, 2024 · 0 comments

Comments

@eggplantzzz
Copy link

eggplantzzz commented Oct 7, 2024

I am using express-http-proxy to proxy requests from a local web app to a certain other remote app (let's call it app A) that returns authentication information after signing in.

When I access app A directly from my local web app and sign in, the response to the login request contains a handful of headers that the browser uses to set a cookie containing an authentication token. Specifically it sends a bunch of non-standard headers along with a "Access-Control-Expose-Headers" header to allow the browser to have access to these headers.

When I send requests from my local app to app A directly, it sets this authentication token in a cookie and I am able to stay logged in. If I instead send requests from my local app and use my express app as a proxy to app A, the response headers do not contain the "Access-Control-Expose-Headers" header (though it does include all the other custom headers, including the token) and no cookie gets set with the necessary authentication token and my session is "timed out".

Do you know of any reason that the proxy would omit passing this header in the response from app A?

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

No branches or pull requests

1 participant