From d979b74784f264731589dfa0904db0745794f5c8 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 7 Oct 2026 15:15:04 +0800 Subject: [PATCH] feat(performance): expose request buffering setting --- .../(main)/performance/components/performance-utils.ts | 4 ++-- frontend/app/(main)/performance/page.tsx | 9 ++++++++- frontend/messages/fragments/ops.en.json | 3 ++- frontend/messages/fragments/ops.zh-CN.json | 3 ++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/frontend/app/(main)/performance/components/performance-utils.ts b/frontend/app/(main)/performance/components/performance-utils.ts index 7350f1df..404c80f3 100644 --- a/frontend/app/(main)/performance/components/performance-utils.ts +++ b/frontend/app/(main)/performance/components/performance-utils.ts @@ -56,7 +56,7 @@ export const defaultPerformanceFields: PerformanceFields = { openresty_proxy_read_timeout: '60', openresty_websocket_enabled: true, openresty_http3_enabled: true, - openresty_proxy_request_buffering_enabled: false, + openresty_proxy_request_buffering_enabled: true, openresty_proxy_buffering_enabled: true, openresty_proxy_buffers: '16 16k', openresty_proxy_buffer_size: '8k', @@ -133,7 +133,7 @@ export function mapOptionsToFields( ), openresty_proxy_request_buffering_enabled: toBoolean( optionMap.openresty_proxy_request_buffering_enabled, - false, + true, ), openresty_proxy_buffering_enabled: toBoolean( optionMap.openresty_proxy_buffering_enabled, diff --git a/frontend/app/(main)/performance/page.tsx b/frontend/app/(main)/performance/page.tsx index 82315198..e997ee4a 100644 --- a/frontend/app/(main)/performance/page.tsx +++ b/frontend/app/(main)/performance/page.tsx @@ -345,6 +345,13 @@ export default function PerformancePage() { updateField('openresty_proxy_buffering_enabled', v) } /> + + updateField('openresty_proxy_request_buffering_enabled', v) + } + /> - + ); } diff --git a/frontend/messages/fragments/ops.en.json b/frontend/messages/fragments/ops.en.json index a64550e4..c59f17f6 100644 --- a/frontend/messages/fragments/ops.en.json +++ b/frontend/messages/fragments/ops.en.json @@ -509,7 +509,8 @@ "runtimeTitle": "Connections and events", "runtimeDesc": "Workers, timeouts, and request body size", "proxyTitle": "Proxy buffers and timeouts", - "proxyDesc": "Upstream connections, buffers, and WebSocket/HTTP3 switches", + "proxyDesc": "Upstream connections, request/response buffering, and WebSocket/HTTP3 switches", + "proxyRequestBuffering": "Request body buffering (turn off for streaming uploads)", "gzipTitle": "Compression", "cacheTitle": "Cache", "cacheDesc": "Single-node reverse-proxy cache", diff --git a/frontend/messages/fragments/ops.zh-CN.json b/frontend/messages/fragments/ops.zh-CN.json index 4909558c..443a7b6d 100644 --- a/frontend/messages/fragments/ops.zh-CN.json +++ b/frontend/messages/fragments/ops.zh-CN.json @@ -509,7 +509,8 @@ "runtimeTitle": "连接与事件", "runtimeDesc": "worker、超时、请求体大小等运行参数", "proxyTitle": "反代缓冲与超时", - "proxyDesc": "upstream 连接、缓冲与 WebSocket/HTTP3 开关", + "proxyDesc": "upstream 连接、请求与响应缓冲,以及 WebSocket/HTTP3 开关", + "proxyRequestBuffering": "请求体缓冲(流式上传时关闭)", "gzipTitle": "压缩", "cacheTitle": "缓存", "cacheDesc": "单节点反代缓存优化场景",