Skip to content

Commit

Permalink
初始化
Browse files Browse the repository at this point in the history
  • Loading branch information
qixing-ai committed Sep 9, 2024
1 parent 76372b8 commit 6e170a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion base/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ http {

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

0 comments on commit 6e170a4

Please sign in to comment.