Files
hometown/docs/nginx-api反向代理.conf
2026-03-08 00:03:14 +08:00

12 lines
471 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 将 /api 请求转发到本机 Node 后端(端口与 start-api.sh 一致,默认 5599
# 把下面这段加入 server { ... } 内,建议放在 root 指令之后、其他 location 之前
location /api {
proxy_pass http://127.0.0.1:5599;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}