mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-16 13:56:52 +00:00
adding wrapper for proxy header passing.
add a selection to the proxy editing page and passes that down into the templates. Removed set_proxy_header from locations and moved to server directive. these will inherit down into locations if they are not defined there.
This commit is contained in:
@@ -24,6 +24,20 @@ proxy_http_version 1.1;
|
||||
|
||||
{{ advanced_config }}
|
||||
|
||||
# Proxy!
|
||||
{% if forward_proxy_header == 1 or forward_proxy_header == true %}
|
||||
proxy_set_header Host $host;
|
||||
{% else %}
|
||||
proxy_set_header Host $proxy_host;
|
||||
{% endif %}
|
||||
include conf.d/include/proxy.conf;
|
||||
|
||||
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
{% endif %}
|
||||
|
||||
{{ locations }}
|
||||
|
||||
{% if use_default_location %}
|
||||
@@ -51,15 +65,6 @@ proxy_http_version 1.1;
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if allow_websocket_upgrade == 1 or allow_websocket_upgrade == true %}
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_http_version 1.1;
|
||||
{% endif %}
|
||||
|
||||
# Proxy!
|
||||
include conf.d/include/proxy.conf;
|
||||
}
|
||||
{% endif %}
|
||||
|
||||
|
Reference in New Issue
Block a user