mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-11 01:36:37 +08:00
feat(waf): 新增 UA 检查节点 ua_check
支持要求携带 UA、浏览器/OS 白名单 and-or 匹配,以及优先屏蔽爬虫与非正常 UA。
This commit is contained in:
@@ -779,6 +779,15 @@ export interface BlockNodeConfig {
|
||||
response_body: string;
|
||||
}
|
||||
|
||||
export interface UACheckConfig {
|
||||
require_ua: boolean;
|
||||
browsers: string[];
|
||||
operating_systems: string[];
|
||||
match_mode: 'and' | 'or';
|
||||
block_common_bots: boolean;
|
||||
block_abnormal_ua: boolean;
|
||||
}
|
||||
|
||||
export type WAFRuleNode =
|
||||
| {
|
||||
id: string;
|
||||
@@ -801,6 +810,13 @@ export type WAFRuleNode =
|
||||
position: XYPosition;
|
||||
config: GeoMatchConfig;
|
||||
}
|
||||
| {
|
||||
id: string;
|
||||
type: 'ua_check';
|
||||
label?: string;
|
||||
position: XYPosition;
|
||||
config: UACheckConfig;
|
||||
}
|
||||
| {
|
||||
id: string;
|
||||
type: 'pow';
|
||||
|
||||
Reference in New Issue
Block a user