This commit is contained in:
yidl 2025-07-02 00:33:54 +08:00
parent 0d00202a80
commit fd646c9785
1 changed files with 8 additions and 1 deletions

View File

@ -82,7 +82,14 @@ http {
# HTTPS后端配置
proxy_ssl_server_name on;
proxy_ssl_verify off;
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;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Port $server_port; # 有些情况下需要
# 关键重写后端返回的Location头防止重定向到内部端口
proxy_redirect https://sys-api:19902/ https://$host:8001/;
}