feat: support remote backend and HTTPS proxy

This commit is contained in:
wizardchen
2026-02-09 17:27:21 +08:00
committed by lyingbug
parent d72f65bc23
commit bfab05972f
4 changed files with 23 additions and 5 deletions
+2 -1
View File
@@ -22,8 +22,9 @@ server {
}
# API请求代理到后端服务
# APP_SCHEME 默认 http,远程 HTTPS 后端可设为 https
location /api/ {
proxy_pass http://${APP_HOST}:${APP_PORT}/api/;
proxy_pass ${APP_SCHEME}://${APP_HOST}:${APP_PORT}/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;