From adf53b0d95231ed83e2f64ce2bca1af0e799ae7d Mon Sep 17 00:00:00 2001 From: Emilien Mantel Date: Tue, 25 Jul 2017 17:00:34 +0200 Subject: [PATCH] Fix redirect_to when filename is set --- templates/etc/nginx/sites-available/_base.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/etc/nginx/sites-available/_base.j2 b/templates/etc/nginx/sites-available/_base.j2 index 006db16..e3300cc 100644 --- a/templates/etc/nginx/sites-available/_base.j2 +++ b/templates/etc/nginx/sites-available/_base.j2 @@ -170,7 +170,7 @@ server { listen {{ port }}{% if port | int in __http_proxy_protocol_port %} proxy_protocol{% endif %}; {% endfor %} server_name {% if item.redirect_from is string %}{{ item.redirect_from }}{% else %}{{ "\n\t\t" }}{{ item.redirect_from | join("\n\t\t") }}{% endif %}; - return 301 $scheme://{{ __main_name }}$request_uri; + return 301 $scheme://{{ item.name if item.name is string else item.name[0] }}$request_uri; } {% endif %}