From 33b71c6b3cd12a36113d0527c9142a4de0cd1a89 Mon Sep 17 00:00:00 2001 From: bizonix Date: Thu, 18 Jun 2015 01:48:15 +0300 Subject: [PATCH] fix wrong redirect $ curl -I https://www.site.co.il/static/images/1.png?a=b | grep Location Location: https://site.co.il?a=b but should be something like Location: https://site.co.il/static/images/1.png?a=b --- management/web_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/management/web_update.py b/management/web_update.py index 331bc21d..f7e1fbef 100644 --- a/management/web_update.py +++ b/management/web_update.py @@ -67,7 +67,7 @@ def do_web_update(env): template0 = open(os.path.join(os.path.dirname(__file__), "../conf/nginx.conf")).read() template1 = open(os.path.join(os.path.dirname(__file__), "../conf/nginx-alldomains.conf")).read() template2 = open(os.path.join(os.path.dirname(__file__), "../conf/nginx-primaryonly.conf")).read() - template3 = "\trewrite / https://$REDIRECT_DOMAIN permanent;\n" + template3 = "\trewrite ^(.*) https://$REDIRECT_DOMAIN$1 permanent;\n" # Add the PRIMARY_HOST configuration first so it becomes nginx's default server. nginx_conf += make_domain_config(env['PRIMARY_HOSTNAME'], [template0, template1, template2], env)