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

X-Forwarded-Host missing from default proxy.conf #2804

Open
thor0215 opened this issue Apr 4, 2023 · 2 comments
Open

X-Forwarded-Host missing from default proxy.conf #2804

thor0215 opened this issue Apr 4, 2023 · 2 comments

Comments

@thor0215
Copy link

thor0215 commented Apr 4, 2023

The default proxy.conf file is missing the X-Forwarded-Host header

add_header X-Served-By $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass $forward_scheme://$server:$port$request_uri;

add_header X-Served-By $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass $forward_scheme://$server:$port$request_uri;

This should be added to the above config:
proxy_set_header X-Forwarded-Host $http_host;

This breaks code-server currently when using the default NGinx Proxy Manager settings
https://github.com/coder/code-server

@662
Copy link

662 commented Apr 15, 2023

X-Forwarded-Port

Copy link

Issue is now considered stale. If you want to keep it open, please comment 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants