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
Using xfwd option with http-proxy doesn't remove x-forwarded-* headers #1628
Comments
Same here, with
So I have to set the header manually before proxying the request: |
yep, seeing the same behaviour when trying to create a proxy using vite:
I'm running locally, so wanted to tell my Staging API Server that we're actually coming from HTTP. It's basically impossible to provide your own x-forwarded-proto. I can disable it and whatever I do, it always sends "https" after my own custom header. I believe it's because I'm using changeOrigin: true? I don't even understand what's the point of setting x-forwarded automatically to the origin server itself? The whole point of it, is to allow me to tell my origin server where it's actually coming from. I can't even find a single workaround/hack for it, apart from using patch-package to delete that functionality |
I am making a reverse proxy with node-http-proxy. I have set the
xfwd
option in the options ofcreateProxyServer
, but it doesn't seem to affect the headers.Here is a snippet of my code:
Can anyone reproduce this? Thanks.
The text was updated successfully, but these errors were encountered: