mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-04-25 09:25:55 +03:00
[PR #3247] Host should be $proxy_host, not $host #3673
Labels
No labels
awaiting feedback
bug
cannot reproduce
dns provider request
duplicate
enhancement
enhancement
enhancement
good first issue
help wanted
invalid
need more info
no certbot plugin available
product-support
pull-request
question
stale
troll
upstream issue
v2
v2
v2
v3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-proxy-manager-NginxProxyManager#3673
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/NginxProxyManager/nginx-proxy-manager/pull/3247
Author: @vbraun
Created: 10/8/2023
Status: 🔄 Open
Base:
develop← Head:use-proxy-host-instead-of-host📝 Commits (1)
30787f7Host should be $proxy_host, not $host📊 Changes
1 file changed (+0 additions, -1 deletions)
View changed files
📝
docker/rootfs/etc/nginx/conf.d/include/proxy.conf(+0 -1)📄 Description
$host is the Host sent by the user's browser. This is the correct setting if the service has built-in support for being proxied.
$proxy_host is the Host as if the browser would run on the proxy. This is the correct setting if the service does not have built-in support for reverse proxies. It is also the nginx default.
In nginx, you cannot unset the Host header. Configuring headers multiple times just sends multiple values with the http request. So there is no way to "fix" the Host by adding a custom header if it is already set.
For these reasons, Host should not be set (and default to $proxy_host). In the unlikely case that your service needs something else you can then just set a custom Host header in the GUI.
Fixes https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2675
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.