perf(deploy): 优化 NGINX 代理配置
- 添加 proxy_connect_timeout、proxy_send_timeout 和 proxy_read_timeout 设置,提高连接和传输的超时时间 - 启用 HTTP/1.1 协议,提升通信效率 - 移除 Connection 头,避免可能导致的连接关闭问题
This commit is contained in:
@@ -13,5 +13,12 @@ server {
|
||||
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_connect_timeout 120;
|
||||
proxy_send_timeout 300;
|
||||
proxy_read_timeout 300;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Connection "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user