We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d80759 commit c203d1aCopy full SHA for c203d1a
backend/templates/_location.conf
@@ -1,5 +1,10 @@
1
location {{ path }} {
2
- set $targetUri {{ forward_scheme }}://{{ forward_host }}:{{ forward_port }}{{ forward_path }}{% unless path contains "(" %}$request_uri{% endunless %};
+ 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 %}
8
proxy_set_header Host $host;
9
proxy_set_header X-Forwarded-Scheme $scheme;
10
proxy_set_header X-Forwarded-Proto $scheme;
0 commit comments