From 1d97ea69d031bd8853d2ed2de2a1da190007df07 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 19 Jul 2026 11:49:55 +0800 Subject: [PATCH] =?UTF-8?q?fix(waf):=20UA=20=E6=A3=80=E6=9F=A5=E5=B1=9E?= =?UTF-8?q?=E6=80=A7=E6=A0=8F=E5=B0=86=E5=B1=8F=E8=94=BD=E5=8C=BA=E5=9D=97?= =?UTF-8?q?=E7=A7=BB=E5=88=B0=E5=8C=B9=E9=85=8D=E4=B8=8A=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../editor/components/node-properties.tsx | 132 +++++++++--------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/frontend/app/(main)/waf/rules/editor/components/node-properties.tsx b/frontend/app/(main)/waf/rules/editor/components/node-properties.tsx index e62520e0..e44ce2b0 100644 --- a/frontend/app/(main)/waf/rules/editor/components/node-properties.tsx +++ b/frontend/app/(main)/waf/rules/editor/components/node-properties.tsx @@ -154,7 +154,7 @@ function PropertyFields({ 开启 UA 检查 - 开启后如果请求头不携带 UA 返回 False;并可配置匹配与屏蔽 + 开启后如果请求头不携带 UA 将返回 False {node.config.require_ua && ( <> - -
-

- UA 匹配 -

- - - 匹配模式 - - - - 浏览器与操作系统两侧都有选择时生效 - - - ({ - value: option.value, - label: option.label, - searchText: `${option.label} ${option.value}`, - }))} - value={node.config.browsers} - onChange={(browsers) => - onChange({ ...node, config: { ...node.config, browsers } }) - } - /> - ({ - value: option.value, - label: option.label, - searchText: `${option.label} ${option.value}`, - }))} - value={node.config.operating_systems} - onChange={(operating_systems) => - onChange({ - ...node, - config: { ...node.config, operating_systems }, - }) - } - /> -
@@ -346,6 +281,71 @@ function PropertyFields({ )}
+ +
+

+ UA 匹配 +

+ + + 匹配模式 + + + + 浏览器与操作系统两侧都有选择时生效 + + + ({ + value: option.value, + label: option.label, + searchText: `${option.label} ${option.value}`, + }))} + value={node.config.browsers} + onChange={(browsers) => + onChange({ ...node, config: { ...node.config, browsers } }) + } + /> + ({ + value: option.value, + label: option.label, + searchText: `${option.label} ${option.value}`, + }))} + value={node.config.operating_systems} + onChange={(operating_systems) => + onChange({ + ...node, + config: { ...node.config, operating_systems }, + }) + } + /> +
)}