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

When proxy-ing the update server does not seem to use the X-Forwarded-Host for the windows Releases file #166

Open
loneparadox opened this issue Jan 7, 2020 · 0 comments

Comments

@loneparadox
Copy link

loneparadox commented Jan 7, 2020

Running nuts behind apache load balancer.

The getFullUrl function uses req.get('host') to get the host to specify in the RELEASES file.
If I understand https://expressjs.com/en/guide/behind-proxies.html correctly, It seems that express only updates req.hostname

I can confirm that behind the proxy that:
req.hostname does return the X-Forwarded-Host when the trust proxy is enabled.
But req.get('host') returns the name of the host in the request.

For example:
If the the main url is updateserver.example.com which I balance to updateserver1.example.com and updateserver2.example.com

Then with the trust proxy enabled, the value of req.hostname is updateserver.example.com
Where the req.get('host') has a value of updateserver1.example.com

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