add support to remove proxy headers
This commit is contained in:
parent
72bd7c7a7d
commit
75e21a2e2e
1 changed files with 5 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ server {
|
||||||
proxy_set_header X-Forwarded-Ssl $https;
|
proxy_set_header X-Forwarded-Ssl $https;
|
||||||
proxy_set_header X-Url-Scheme $scheme;
|
proxy_set_header X-Url-Scheme $scheme;
|
||||||
|
|
||||||
# custom proxy headers
|
# add custom proxy headers
|
||||||
{% for header in vhost.add_proxy_headers|d({}) if header %}
|
{% for header in vhost.add_proxy_headers|d({}) if header %}
|
||||||
proxy_set_header {{ header }} "{{ vhost.add_proxy_headers[header] }}";
|
proxy_set_header {{ header }} "{{ vhost.add_proxy_headers[header] }}";
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
@ -49,6 +49,10 @@ server {
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "upgrade";
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
# remove custom proxy headers
|
||||||
|
{% for header in vhost.hide_proxy_headers|d({}) if header %}
|
||||||
|
proxy_hide_header {{ header }};
|
||||||
|
{% endfor %}
|
||||||
# hide downstream headers for security reasons
|
# hide downstream headers for security reasons
|
||||||
proxy_hide_header X-Powered-By;
|
proxy_hide_header X-Powered-By;
|
||||||
proxy_hide_header Server;
|
proxy_hide_header Server;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue