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

make the posibility to choose the way the host and x-forward-x are set in _location.conf #3981

Open
mcarbonneaux opened this issue Sep 6, 2024 · 0 comments

Comments

@mcarbonneaux
Copy link

Is your feature request related to a problem? Please describe.
actualy after commit 280bac8 you cannot fix host and x-forward-xxx header in advanced config.

because the advanced config in _location.conf template are now before default config and in default config you set host header like that (and some x-forward headers):

proxy_set_header Host $host;

this make impossible to use Nginx Proxy Manager with application that control not only the fqdn but also the port used of the host header sended by nginx (if are behind nat port forwarding for example).

like her : esphome/issues#4327

Describe the solution you'd like
To preserve the host AND the port you MUST use $http_host nginx variable in place of $host:
https://serverfault.com/questions/706438/what-is-the-difference-between-nginx-variables-host-http-host-and-server-na

Because http_host is http_HEADER and is value of host header sended by the navigator.

Is different than host that are processed host by nginx that use listen port in place of the host header port.

Can you replace host by http_host by default or add the posibility to switch in option the way the template generate the host header ?

Describe alternatives you've considered
Revert commit 280bac8 that bloc the possibility to overide the host and x-forward-xxx headers.

Or add option to abel to choose the placement of the advanced option before or after default config.

@mcarbonneaux mcarbonneaux changed the title make the posibility to choose the way the host and x-forward-host are set in _location.conf make the posibility to choose the way the host and x-forward-x are set in _location.conf Sep 6, 2024
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

1 participant