fix: frontend depends app health
This commit is contained in:
@@ -2,6 +2,10 @@ server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
client_max_body_size 50M;
|
||||
|
||||
# 错误日志配置
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
access_log /var/log/nginx/access.log;
|
||||
|
||||
# 前端静态文件
|
||||
location / {
|
||||
@@ -18,6 +22,12 @@ server {
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
|
||||
# 连接和重试配置
|
||||
proxy_connect_timeout 30s; # 连接超时时间
|
||||
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
|
||||
proxy_next_upstream_tries 3; # 重试次数
|
||||
proxy_next_upstream_timeout 30s; # 重试超时时间
|
||||
|
||||
# SSE 相关配置
|
||||
proxy_http_version 1.1; # 使用 HTTP/1.1
|
||||
proxy_set_header Connection ""; # 禁用 Connection: close,保持连接打开
|
||||
|
||||
Reference in New Issue
Block a user