From c11eda86d8d4f920921a3f02d7448fda4b263c51 Mon Sep 17 00:00:00 2001 From: yidl Date: Thu, 31 Jul 2025 23:07:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=99=84=E4=BB=B6=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf.gateway | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/nginx.conf.gateway b/nginx.conf.gateway index b856809..c163253 100644 --- a/nginx.conf.gateway +++ b/nginx.conf.gateway @@ -118,26 +118,26 @@ http { sub_filter_once off; sub_filter 'https://sys-api:19902' 'https://$host:8001'; sub_filter 'https://sys_api' 'https://$host:8001'; - } - location ~*/Upload/ { - proxy_pass https://sys_api/upload/; - proxy_ssl_server_name on; - proxy_ssl_verify off; - proxy_set_header Authorization $http_authorization; - } - - location ~*/temporary_upload/ { - proxy_pass https://sys_api/temporary_upload/; - proxy_ssl_server_name on; - proxy_ssl_verify off; - proxy_set_header Authorization $http_authorization; } # UI前端路由 location / { proxy_pass http://sys_ui; proxy_set_header Host $host; } + + location ~*/upload/ { + proxy_pass https://sys_api; + proxy_ssl_server_name on; + proxy_ssl_verify off; + proxy_set_header Authorization $http_authorization; + } + location /temporary_upload/ { + proxy_pass https://sys_api/temporary_upload/; + proxy_ssl_server_name on; + proxy_ssl_verify off; + proxy_set_header Authorization $http_authorization; + } } @@ -163,6 +163,13 @@ http { proxy_ssl_verify off; proxy_set_header Authorization $http_authorization; } + + # UI前端路由 + location /{ + proxy_pass http://lmg_ui/; # 注意末尾的/ + proxy_set_header Host $host; + } + location /auth/ { # 关键 1: 移除路径中的 /auth/ 前缀 proxy_pass https://sys_api/; # 末尾的 / 确保路径替换 @@ -203,23 +210,17 @@ http { } location ~*/upload/ { - proxy_pass https://sys_api/upload/; + proxy_pass https://sys_api; proxy_ssl_server_name on; proxy_ssl_verify off; proxy_set_header Authorization $http_authorization; } - location ~*/temporary_upload/ { + location /temporary_upload/ { proxy_pass https://sys_api/upload/; proxy_ssl_server_name on; proxy_ssl_verify off; proxy_set_header Authorization $http_authorization; } - # UI前端路由 - location /{ - proxy_pass http://lmg_ui/; # 注意末尾的/ - proxy_set_header Host $host; - } - } }