Skip to content

Commit 6e170a4

Browse files
committed
初始化
1 parent 76372b8 commit 6e170a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

base/nginx.conf

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ http {
2626

2727
# 转发 API 请求到后端服务
2828
location /api/ {
29-
proxy_pass http://localhost:8080;
29+
rewrite ^/api/(.*)$ /$1 break; # 去掉 /api 前缀
30+
proxy_pass http://localhost:8080; # 代理到后端服务端口
3031
proxy_set_header Host $host;
3132
proxy_set_header X-Real-IP $remote_addr;
3233
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)