perf(agent): optimize web SSE streaming

This commit is contained in:
jxxghp
2026-08-07 12:44:28 +08:00
parent 759b9e47eb
commit 865635c59d
3 changed files with 437 additions and 36 deletions

View File

@@ -31,15 +31,16 @@ location /cookiecloud {
}
# SSE特殊配置
location ~ ^/api/v1/(system/(message|progress/|logging)|search/.*/stream$) {
location ~ ^/api/v1/(system/(message|progress/|logging)|search/.*/stream$|message/agent/stream$) {
error_log /dev/null crit;
# SSE MIME类型设置
default_type text/event-stream;
# 禁用缓存
add_header Cache-Control no-cache;
add_header Cache-Control "no-cache, no-transform";
add_header X-Accel-Buffering no;
gzip off;
proxy_buffering off;
proxy_cache off;