mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-08 16:46:37 +08:00
feat(performance): expose request buffering setting
This commit is contained in:
@@ -56,7 +56,7 @@ export const defaultPerformanceFields: PerformanceFields = {
|
|||||||
openresty_proxy_read_timeout: '60',
|
openresty_proxy_read_timeout: '60',
|
||||||
openresty_websocket_enabled: true,
|
openresty_websocket_enabled: true,
|
||||||
openresty_http3_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_buffering_enabled: true,
|
||||||
openresty_proxy_buffers: '16 16k',
|
openresty_proxy_buffers: '16 16k',
|
||||||
openresty_proxy_buffer_size: '8k',
|
openresty_proxy_buffer_size: '8k',
|
||||||
@@ -133,7 +133,7 @@ export function mapOptionsToFields(
|
|||||||
),
|
),
|
||||||
openresty_proxy_request_buffering_enabled: toBoolean(
|
openresty_proxy_request_buffering_enabled: toBoolean(
|
||||||
optionMap.openresty_proxy_request_buffering_enabled,
|
optionMap.openresty_proxy_request_buffering_enabled,
|
||||||
false,
|
true,
|
||||||
),
|
),
|
||||||
openresty_proxy_buffering_enabled: toBoolean(
|
openresty_proxy_buffering_enabled: toBoolean(
|
||||||
optionMap.openresty_proxy_buffering_enabled,
|
optionMap.openresty_proxy_buffering_enabled,
|
||||||
|
|||||||
@@ -345,6 +345,13 @@ export default function PerformancePage() {
|
|||||||
updateField('openresty_proxy_buffering_enabled', v)
|
updateField('openresty_proxy_buffering_enabled', v)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
<ToggleRow
|
||||||
|
label={t('proxyRequestBuffering')}
|
||||||
|
checked={fields.openresty_proxy_request_buffering_enabled}
|
||||||
|
onChange={(v) =>
|
||||||
|
updateField('openresty_proxy_request_buffering_enabled', v)
|
||||||
|
}
|
||||||
|
/>
|
||||||
<FieldInput
|
<FieldInput
|
||||||
label='proxy_buffers'
|
label='proxy_buffers'
|
||||||
value={fields.openresty_proxy_buffers}
|
value={fields.openresty_proxy_buffers}
|
||||||
@@ -499,7 +506,7 @@ function ToggleRow({
|
|||||||
return (
|
return (
|
||||||
<div className='flex items-center justify-between rounded-lg border border-dashed px-3 py-2'>
|
<div className='flex items-center justify-between rounded-lg border border-dashed px-3 py-2'>
|
||||||
<Label className='text-xs'>{label}</Label>
|
<Label className='text-xs'>{label}</Label>
|
||||||
<Switch checked={checked} onCheckedChange={onChange} />
|
<Switch checked={checked} onCheckedChange={onChange} aria-label={label} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -509,7 +509,8 @@
|
|||||||
"runtimeTitle": "Connections and events",
|
"runtimeTitle": "Connections and events",
|
||||||
"runtimeDesc": "Workers, timeouts, and request body size",
|
"runtimeDesc": "Workers, timeouts, and request body size",
|
||||||
"proxyTitle": "Proxy buffers and timeouts",
|
"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",
|
"gzipTitle": "Compression",
|
||||||
"cacheTitle": "Cache",
|
"cacheTitle": "Cache",
|
||||||
"cacheDesc": "Single-node reverse-proxy cache",
|
"cacheDesc": "Single-node reverse-proxy cache",
|
||||||
|
|||||||
@@ -509,7 +509,8 @@
|
|||||||
"runtimeTitle": "连接与事件",
|
"runtimeTitle": "连接与事件",
|
||||||
"runtimeDesc": "worker、超时、请求体大小等运行参数",
|
"runtimeDesc": "worker、超时、请求体大小等运行参数",
|
||||||
"proxyTitle": "反代缓冲与超时",
|
"proxyTitle": "反代缓冲与超时",
|
||||||
"proxyDesc": "upstream 连接、缓冲与 WebSocket/HTTP3 开关",
|
"proxyDesc": "upstream 连接、请求与响应缓冲,以及 WebSocket/HTTP3 开关",
|
||||||
|
"proxyRequestBuffering": "请求体缓冲(流式上传时关闭)",
|
||||||
"gzipTitle": "压缩",
|
"gzipTitle": "压缩",
|
||||||
"cacheTitle": "缓存",
|
"cacheTitle": "缓存",
|
||||||
"cacheDesc": "单节点反代缓存优化场景",
|
"cacheDesc": "单节点反代缓存优化场景",
|
||||||
|
|||||||
Reference in New Issue
Block a user