瀏覽代碼

Reverts back to proxy_pass without variables

chaptergy 4 年之前
父節點
當前提交
1f879f67a9
共有 2 個文件被更改,包括 2 次插入9 次删除
  1. 1 7
      backend/templates/_location.conf
  2. 1 2
      docker/rootfs/etc/nginx/conf.d/include/proxy.conf

+ 1 - 7
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 %}

+ 1 - 2
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;