Unhardcode proxy_set_header
This patch unhardcode proxy_set_header options from proxy template.
The default behaviour is keept. Header might be passed via the following
pillar of site definition:
nginx:
server:
site:
abc:
type: nginx_proxy
proxy_set_header:
My-Header:
enabled: true
value: '"MyValue"'
Related-Prod: PROD-23522
Change-Id: I8108b7ca0deab6b0c79a764beec3ca90e39d3f17
diff --git a/README.rst b/README.rst
index 8c08775..927eaaf 100644
--- a/README.rst
+++ b/README.rst
@@ -472,6 +472,33 @@
always: true
enabled: true
+Setting custom proxy headers:
+
+.. code-block:: yaml
+
+ nginx:
+ server:
+ enabled: true
+ site:
+ custom_headers:
+ type: nginx_proxy
+ proxy_set_header:
+ Host:
+ enabled: true
+ value: "$host:8774"
+ X-Real-IP:
+ enabled: true
+ value: '$remote_addr'
+ X-Forwarded-For:
+ enabled: true
+ value: '$proxy_add_x_forwarded_for'
+ X-Forwarded-Proto:
+ enabled: true
+ value: '$scheme'
+ X-Forwarded-Port:
+ enabled: true
+ value: '$server_port'
+
Nginx stats server (required by collectd nginx plugin):
.. code-block:: yaml