Skip to content

Commit

Permalink
Reverts back to proxy_pass without variables
Browse files Browse the repository at this point in the history
  • Loading branch information
chaptergy committed Nov 9, 2021
1 parent 3bd97ae commit 1f879f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 1 addition & 7 deletions 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 %}
Expand Down
3 changes: 1 addition & 2 deletions 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;

0 comments on commit 1f879f6

Please sign in to comment.