mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-22 20:54:26 +08:00
fix(GatewaySecurityFilter.java): 线上环境限制请求路径判断错误问题修复
This commit is contained in:
parent
a09996080d
commit
fc5bba4b3d
@ -60,9 +60,9 @@ public class GatewaySecurityFilter implements GlobalFilter, Ordered {
|
||||
if (!isPermitPath) {
|
||||
return ResponseUtils.writeErrorInfo(response, ResultCode.FORBIDDEN_OPERATION);
|
||||
}
|
||||
} else {
|
||||
} else if(methodValue.equals("POST")){
|
||||
// 是否禁止放行的请求路径
|
||||
boolean isForbidPath = SecurityConstants.PROD_FORBID_PATHS.stream().anyMatch(permitPath -> requestPath.contains(permitPath));
|
||||
boolean isForbidPath = SecurityConstants.PROD_FORBID_PATHS.stream().anyMatch(permitPath -> requestPath.equals(permitPath));
|
||||
if (isForbidPath) {
|
||||
return ResponseUtils.writeErrorInfo(response, ResultCode.FORBIDDEN_OPERATION);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user