diff --git a/backend/templates/_location.conf b/backend/templates/_location.conf index 5a7a6abe..10564182 100644 --- a/backend/templates/_location.conf +++ b/backend/templates/_location.conf @@ -1,10 +1,14 @@ location {{ path }} { + set $forward_scheme {{ forward_scheme }}; + set $forward_host {{ forward_host }}; + set $forward_port {{ forward_port }}; + proxy_set_header Host $host; proxy_set_header X-Forwarded-Scheme $scheme; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; - proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }}; + proxy_pass $forward_scheme://$forward_host:$forward_port{{ forward_path }}; {% if access_list_id > 0 %} {% if access_list.items.length > 0 %} @@ -39,7 +43,5 @@ proxy_http_version 1.1; {% endif %} - {{ advanced_config }} } -