Skip to content

Commit cb09104

Browse files
authored
Merge pull request #1578 from jc21/undo-switch-to-variables
Reverts back to proxy_pass without variables
2 parents 3bd97ae + 1f879f6 commit cb09104

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

backend/templates/_location.conf

Lines changed: 1 addition & 7 deletions
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 %}
Lines changed: 1 addition & 2 deletions
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)