From 1f879f67a9bed8f5eb444d00ad47c353b8a75db8 Mon Sep 17 00:00:00 2001 From: chaptergy Date: Tue, 9 Nov 2021 13:57:39 +0100 Subject: [PATCH] Reverts back to proxy_pass without variables --- backend/templates/_location.conf | 8 +------- docker/rootfs/etc/nginx/conf.d/include/proxy.conf | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/backend/templates/_location.conf b/backend/templates/_location.conf index f286fda7..5a7a6abe 100644 --- a/backend/templates/_location.conf +++ b/backend/templates/_location.conf @@ -1,16 +1,10 @@ location {{ path }} { - set $targetUri {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }}; - {% unless path contains "~" and path contains "(" and path contains ")" %} - if ($request_uri != /){ - set $targetUri $targetUri$request_uri; - } - {% endunless %} 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 $targetUri; + proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }}; {% if access_list_id > 0 %} {% if access_list.items.length > 0 %} diff --git a/docker/rootfs/etc/nginx/conf.d/include/proxy.conf b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf index ac5b306a..fcaaf003 100644 --- a/docker/rootfs/etc/nginx/conf.d/include/proxy.conf +++ b/docker/rootfs/etc/nginx/conf.d/include/proxy.conf @@ -1,9 +1,8 @@ -set $targetUri $forward_scheme://$server:$port$request_uri; add_header X-Served-By $host; 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 $targetUri; +proxy_pass $forward_scheme://$server:$port$request_uri;