summaryrefslogtreecommitdiff
path: root/roles/nginx/vhost/templates/generic-proxy-no-buffering-with-acme.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nginx/vhost/templates/generic-proxy-no-buffering-with-acme.conf.j2')
-rw-r--r--roles/nginx/vhost/templates/generic-proxy-no-buffering-with-acme.conf.j210
1 files changed, 4 insertions, 6 deletions
diff --git a/roles/nginx/vhost/templates/generic-proxy-no-buffering-with-acme.conf.j2 b/roles/nginx/vhost/templates/generic-proxy-no-buffering-with-acme.conf.j2
index 0d3e1db2..1003ab88 100644
--- a/roles/nginx/vhost/templates/generic-proxy-no-buffering-with-acme.conf.j2
+++ b/roles/nginx/vhost/templates/generic-proxy-no-buffering-with-acme.conf.j2
@@ -28,11 +28,7 @@ server {
{% endif %}
proxy_set_header Host $host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-Ssl on;
- proxy_set_header X-Forwarded-Port $server_port;
+ include snippets/proxy-forward-headers.conf;
# for websockets
proxy_set_header Upgrade $http_upgrade;
@@ -40,7 +36,9 @@ server {
proxy_pass {{ nginx_vhost.proxy_pass }};
{% if 'proxy_redirect' in nginx_vhost %}
- proxy_redirect {{ nginx_vhost.proxy_redirect.redirect }} {{ nginx_vhost.proxy_redirect.replacement }};
+{% for entry in nginx_vhost.proxy_redirect %}
+ proxy_redirect {{ entry.redirect }} {{ entry.replacement }};
+{% endfor %}
{% endif %}
}
}