From 13c94241c2d499813649834f203a8b08f26efdf1 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Tue, 30 Mar 2021 20:17:30 -0600 Subject: [PATCH] retain x-forwarded-proto --- appmgr/src/nginx-standard.conf.template | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/appmgr/src/nginx-standard.conf.template b/appmgr/src/nginx-standard.conf.template index 7e630becc..499e5827b 100644 --- a/appmgr/src/nginx-standard.conf.template +++ b/appmgr/src/nginx-standard.conf.template @@ -1,3 +1,10 @@ +map $http_x_forwarded_proto $real_proto {{ + ext+onions ext+onions; + ext+onion ext+onion; + https https; + http http; + default $scheme; +}} server {{ listen 443 ssl; server_name {hostname}.local; @@ -8,7 +15,7 @@ server {{ 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-Proto $real_proto; client_max_body_size 0; proxy_request_buffering off; proxy_buffering off;