From f1409e8bf6faea2d425b139b1b1096eb45107ffc Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Wed, 27 Jul 2022 17:10:30 +0200 Subject: [PATCH] Update bundled nginx config --- defaults/nginx.conf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/defaults/nginx.conf b/defaults/nginx.conf index 085a246..cf1f033 100644 --- a/defaults/nginx.conf +++ b/defaults/nginx.conf @@ -19,6 +19,16 @@ http { gzip_vary on; gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml; + map $http_x_forwarded_proto $pass_scheme { + default $http_x_forwarded_proto; + '' $scheme; + } + + map $http_x_forwarded_host $pass_host { + default $http_x_forwarded_host; + '' $host; + } + server { listen 8000; @@ -26,7 +36,11 @@ http { index index.html; location = / { - return 307 /wdc; + return 307 $pass_scheme://$pass_host/wdc; + } + + location = /index.html { + return 307 $pass_scheme://$pass_host/wdc/index.html; } location ~* \.(html|json)$ {