From 1143204d97688fa7dc8e01aae27da841afdac6b1 Mon Sep 17 00:00:00 2001 From: Byju Abraham Date: Wed, 13 Apr 2022 03:58:20 +0000 Subject: [PATCH] Replace forced HTTPS with nginx variable --- images/nginx/nginx-template.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/nginx/nginx-template.conf b/images/nginx/nginx-template.conf index 087a2d9b..3f2ee17f 100644 --- a/images/nginx/nginx-template.conf +++ b/images/nginx/nginx-template.conf @@ -54,9 +54,9 @@ server { } location / { - rewrite ^(.+)/$ https://$http_host$1 permanent; - rewrite ^(.+)/index\.html$ https://$http_host$1 permanent; - rewrite ^(.+)\.html$ https://$http_host$1 permanent; + rewrite ^(.+)/$ $proxy_x_forwarded_proto://$http_host$1 permanent; + rewrite ^(.+)/index\.html$ $proxy_x_forwarded_proto://$http_host$1 permanent; + rewrite ^(.+)\.html$ $proxy_x_forwarded_proto://$http_host$1 permanent; location ~ ^/files/.*.(htm|html|svg|xml) { add_header Content-disposition "attachment";