feat(performance): expose request buffering setting

This commit is contained in:
ryan
2026-10-07 15:15:04 +08:00
parent 5e86f63c46
commit d979b74784
4 changed files with 14 additions and 5 deletions
@@ -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,
+8 -1
View File
@@ -345,6 +345,13 @@ export default function PerformancePage() {
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
label='proxy_buffers'
value={fields.openresty_proxy_buffers}
@@ -499,7 +506,7 @@ function ToggleRow({
return (
<div className='flex items-center justify-between rounded-lg border border-dashed px-3 py-2'>
<Label className='text-xs'>{label}</Label>
<Switch checked={checked} onCheckedChange={onChange} />
<Switch checked={checked} onCheckedChange={onChange} aria-label={label} />
</div>
);
}