Package cn.dev33.satoken.strategy.hooks
Class SaFirewallCheckHookForHttpMethod
java.lang.Object
cn.dev33.satoken.strategy.hooks.SaFirewallCheckHookForHttpMethod
- All Implemented Interfaces:
SaFirewallCheckHook
防火墙策略校验钩子函数:请求 Method 检测
- Since:
- 1.41.0
- Author:
- click33
-
Field Summary
FieldsModifier and TypeFieldDescription允许的 HttpMethod 列表默认实例boolean是否校验 请求Method,默认开启 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(SaRequest req, SaResponse res, Object extArg) 执行的方法voidresetConfig(boolean isCheckMethod, String... methods) 配置
-
Field Details
-
instance
默认实例 -
isCheckMethod
public boolean isCheckMethod是否校验 请求Method,默认开启 -
allowMethods
允许的 HttpMethod 列表
-
-
Constructor Details
-
SaFirewallCheckHookForHttpMethod
public SaFirewallCheckHookForHttpMethod()
-
-
Method Details
-
resetConfig
配置- Parameters:
isCheckMethod- 是否校验 Methodmethods- 允许的 HttpMethod 列表 (先清空原来的,再添加上新的)
-
execute
执行的方法- Specified by:
executein interfaceSaFirewallCheckHook- Parameters:
req- 请求对象res- 响应对象extArg- 预留扩展参数
-