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)$ {