Skip to content

Commit 1f879f6

Browse files
committedNov 9, 2021
Reverts back to proxy_pass without variables
1 parent 3bd97ae commit 1f879f6

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed
 

‎backend/templates/_location.conf

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
location {{ path }} {
2-
set $targetUri {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};
3-
{% unless path contains "~" and path contains "(" and path contains ")" %}
4-
if ($request_uri != /){
5-
set $targetUri $targetUri$request_uri;
6-
}
7-
{% endunless %}
82
proxy_set_header Host $host;
93
proxy_set_header X-Forwarded-Scheme $scheme;
104
proxy_set_header X-Forwarded-Proto $scheme;
115
proxy_set_header X-Forwarded-For $remote_addr;
126
proxy_set_header X-Real-IP $remote_addr;
13-
proxy_pass $targetUri;
7+
proxy_pass {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }};
148

159
{% if access_list_id > 0 %}
1610
{% if access_list.items.length > 0 %}
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
set $targetUri $forward_scheme://$server:$port$request_uri;
21
add_header X-Served-By $host;
32
proxy_set_header Host $host;
43
proxy_set_header X-Forwarded-Scheme $scheme;
54
proxy_set_header X-Forwarded-Proto $scheme;
65
proxy_set_header X-Forwarded-For $remote_addr;
76
proxy_set_header X-Real-IP $remote_addr;
8-
proxy_pass $targetUri;
7+
proxy_pass $forward_scheme://$server:$port$request_uri;
98

0 commit comments

Comments
 (0)
Please sign in to comment.