fix: nginx适配流式输出
This commit is contained in:
@@ -78,6 +78,17 @@ server {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# 流式输出支持
|
||||
proxy_buffering off; # 禁用代理缓冲
|
||||
proxy_cache off; # 禁用代理缓存
|
||||
chunked_transfer_encoding on; # 启用分块传输编码
|
||||
tcp_nopush off; # 禁用TCP NOPUSH选项,确保数据立即发送
|
||||
tcp_nodelay on; # 启用TCP NODELAY选项,禁用Nagle算法
|
||||
keepalive_timeout 65; # 保持连接超时
|
||||
|
||||
# 确保不会压缩流式响应
|
||||
gzip off; # 对API响应禁用gzip压缩
|
||||
}
|
||||
|
||||
# 静态文件缓存设置
|
||||
|
||||
Reference in New Issue
Block a user