类 SaFirewallCheckHookForHttpMethod
java.lang.Object
cn.dev33.satoken.strategy.hooks.SaFirewallCheckHookForHttpMethod
- 所有已实现的接口:
SaFirewallCheckHook
防火墙策略校验钩子函数:请求 Method 检测
- 从以下版本开始:
- 1.41.0
- 作者:
- click33
-
字段概要
字段修饰符和类型字段说明允许的 HttpMethod 列表默认实例boolean是否校验 请求Method,默认开启 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidexecute(SaRequest req, SaResponse res, Object extArg) 执行的方法voidresetConfig(boolean isCheckMethod, String... methods) 配置
-
字段详细资料
-
instance
默认实例 -
isCheckMethod
public boolean isCheckMethod是否校验 请求Method,默认开启 -
allowMethods
允许的 HttpMethod 列表
-
-
构造器详细资料
-
SaFirewallCheckHookForHttpMethod
public SaFirewallCheckHookForHttpMethod()
-
-
方法详细资料
-
resetConfig
配置- 参数:
isCheckMethod- 是否校验 Methodmethods- 允许的 HttpMethod 列表 (先清空原来的,再添加上新的)
-
execute
执行的方法- 指定者:
execute在接口中SaFirewallCheckHook- 参数:
req- 请求对象res- 响应对象extArg- 预留扩展参数
-