fix(deploy): harden container and bare-metal installs

This commit is contained in:
Awuqing
2026-08-09 02:31:22 +08:00
parent ab181b3197
commit ae9623c078
9 changed files with 217 additions and 116 deletions
+8 -2
View File
@@ -8,11 +8,15 @@ server {
location /api/ {
proxy_pass http://127.0.0.1:8340/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Host $http_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 $http_host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Connection "";
client_max_body_size 0;
proxy_request_buffering off;
proxy_buffering off;
proxy_cache off;
proxy_read_timeout 3600s;
@@ -23,10 +27,12 @@ server {
location /install/ {
proxy_pass http://127.0.0.1:8340/install/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Host $http_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 $http_host;
proxy_set_header X-Forwarded-Port $server_port;
}
# 健康检查端点同样不走 SPA fallback。