Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[建议] 希望增加一个“为空”和“不为空”的判断条件 #744

Open
Lvshujun0918 opened this issue Mar 12, 2024 · 6 comments
Labels

Comments

@Lvshujun0918
Copy link
Contributor

背景与遇到的问题

希望在黑名单的Header匹配条件中加入一个为空和不为空的选项,即判断Header头里面是否有某个参数。

建议的解决方案

如图
image

@zhxind
Copy link

zhxind commented Mar 14, 2024

臣附议

@zhxind
Copy link

zhxind commented Mar 14, 2024

想拦截UA为空的访问,现在的配置项好些没办法实现

@Lorna0
Copy link
Collaborator

Lorna0 commented Mar 27, 2024

为啥需要判断Header头里面是否有某个参数呢

@Lorna0 Lorna0 added enhancement New feature or request need more information labels Mar 27, 2024
@Lvshujun0918
Copy link
Contributor Author

比如说如果UA为空,那很有可能就是机器人

@Lorna0
Copy link
Collaborator

Lorna0 commented Mar 27, 2024

比如说如果UA为空,那很有可能就是机器人

你想说的是不是 【没有 UA】?机器人一般也不会特地发个 UA 但是为空。

可以看看大家反馈。但是 “拦截没有 UA 的请求” 这种规则非常好绕过呀,机器人加个 UA 就行了,似乎效果很有限?想防机器人的话还是建议直接开 “语义分析” - “机器人检测” 或者 “人机验证”。

@Lvshujun0918
Copy link
Contributor Author

我的意思就是请求头里不含UA这个字段。有这个判断条件可以判断出来当然是更好,用“机器人检测”有些识别不到。
又比如我的业务系统只有带特定某个Header(比如X-ACF)才能访问,具体校验可以等到后端,但前面可以通过防火墙先拦掉没有这个Header的请求,减轻后端压力。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants