From 76cfbd6468f68d6c8487c3dcdfe0655812b811a4 Mon Sep 17 00:00:00 2001 From: Byju Abraham <65185610+polycurve@users.noreply.github.com> Date: Wed, 13 Apr 2022 14:49:35 +0530 Subject: [PATCH] Add the base URL to the rewrite rules in the nginx config template (#779) * Add the base URL to the rewrite rules in the nginx config template * Replace forced HTTPS with nginx variable * ci: fix inputs.platforms (#782) * ci: fix inputs.platforms * ci: remove inputs.platforms Co-authored-by: Revant Nandgaonkar --- 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 be55ac47..3f2ee17f 100644 --- a/images/nginx/nginx-template.conf +++ b/images/nginx/nginx-template.conf @@ -54,9 +54,9 @@ server { } location / { - rewrite ^(.+)/$ $1 permanent; - rewrite ^(.+)/index\.html$ $1 permanent; - rewrite ^(.+)\.html$ $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";