added possibility to disable additional headers ( radosgw api requirement )
Change-Id: I34621ec2e0a61aadbf2c90ab63d1bf1d3293c4e1
diff --git a/nginx/files/proxy.conf b/nginx/files/proxy.conf
index 39f941c..7416e3e 100644
--- a/nginx/files/proxy.conf
+++ b/nginx/files/proxy.conf
@@ -68,6 +68,7 @@
proxy_http_version 1.1;
+ {%- if site.proxy.get('headers', True) %}
proxy_set_header Host $host{% if site.host.port is defined and site.host.port not in [80,443] %}:{{ site.host.port }}{% endif %};
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -75,6 +76,7 @@
proxy_set_header X-Forwarded-Host $host{% if site.host.port is defined and site.host.port not in [80,443] %}:{{ site.host.port }}{% endif %};
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port $server_port;
+ {%- endif %}
{%- if site.get('ssl', {'enabled': False}).get('enabled', False) %}
add_header Front-End-Https on;
{%- endif %}