commit | 5da1c7e65c4e07b2edf5a874f5efe18b9c96baec | [log] [tgz] |
---|---|---|
author | Jiarenxiang <SingalJia@outlook.com> | Sun Jun 08 22:06:59 2025 +0800 |
committer | Jiarenxiang <SingalJia@outlook.com> | Sun Jun 08 22:06:59 2025 +0800 |
tree | 1aa3a286d1e113e89eb830af329e21a98eea9e15 | |
parent | e449fa1ae408c68d53f0dce8b447a034f0ad20c1 [diff] |
~ Change-Id: I607643e5e86e708e99268e9d92eabbb0499fc0b1
diff --git a/nginx.conf b/nginx.conf index b49df7b..5e1dcde 100644 --- a/nginx.conf +++ b/nginx.conf
@@ -20,7 +20,9 @@ # API代理 - 指向后端服务 location ^~/api/ { - proxy_pass http://127.0.0.1:5004/; # 使用宿主机端口代理 + rewrite ^/api(/.*)$ $1 break; + + proxy_pass http://127.0.0.1:5004; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;