fix: various UI and server improvements

This commit is contained in:
2026-03-18 13:25:46 +08:00
parent 3c41503827
commit 9300aff26f
11 changed files with 58 additions and 22 deletions

Binary file not shown.

View File

@@ -5825,7 +5825,9 @@ function setupProxy(app) {
const requestHeaders = {
...(typeof req.headers.accept === 'string' ? { accept: req.headers.accept } : { accept: 'text/event-stream' }),
'cache-control': 'no-cache',
'cache-control': 'no-cache, no-store, must-revalidate',
'pragma': 'no-cache',
'expires': '0',
connection: 'keep-alive',
...(authHeaders.Authorization ? { Authorization: authHeaders.Authorization } : {}),
};
@@ -5859,7 +5861,7 @@ function setupProxy(app) {
idleTimer = setTimeout(() => {
endedBy = 'idle-timeout';
controller.abort();
}, 5 * 60 * 1000);
}, 30 * 60 * 1000); // 30 minutes
};
const onClientClose = () => {
@@ -5901,7 +5903,9 @@ function setupProxy(app) {
const upstreamContentType = upstreamResponse.headers.get('content-type') || 'text/event-stream';
res.status(upstreamResponse.status);
res.setHeader('content-type', upstreamContentType);
res.setHeader('cache-control', 'no-cache');
res.setHeader('cache-control', 'no-cache, no-store, must-revalidate');
res.setHeader('pragma', 'no-cache');
res.setHeader('expires', '0');
res.setHeader('connection', 'keep-alive');
res.setHeader('x-accel-buffering', 'no');
res.setHeader('x-content-type-options', 'nosniff');