From ad26208dfb4b1b0074ca86b69b24f4d797b373f0 Mon Sep 17 00:00:00 2001 From: louis <869322496@qq.com> Date: Thu, 28 Mar 2024 13:35:01 +0800 Subject: [PATCH] fix: nginx --- nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index cbb1730..65202de 100644 --- a/nginx.conf +++ b/nginx.conf @@ -61,7 +61,7 @@ http { # 后端服务 - location /api/ { + location ^~ /api/ { proxy_pass http://huaxin-admin-server:8001/api/; # 转发规则 proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header X-Real-IP $remote_addr; @@ -81,7 +81,7 @@ http { proxy_http_version 1.1; } # 文件访问 - location /upload/ { + location ^~ /upload/ { proxy_pass http://huaxin-admin-server:8001/upload/; proxy_set_header Host $proxy_host; # 修改转发请求头,让目标应用可以受到真实的请求 proxy_set_header X-Real-IP $remote_addr;