提交 fc5bba4b 编写于 作者: 郝先瑞

fix(GatewaySecurityFilter.java): 线上环境限制请求路径判断错误问题修复

上级 a0999608
...@@ -60,9 +60,9 @@ public class GatewaySecurityFilter implements GlobalFilter, Ordered { ...@@ -60,9 +60,9 @@ public class GatewaySecurityFilter implements GlobalFilter, Ordered {
if (!isPermitPath) { if (!isPermitPath) {
return ResponseUtils.writeErrorInfo(response, ResultCode.FORBIDDEN_OPERATION); 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) { if (isForbidPath) {
return ResponseUtils.writeErrorInfo(response, ResultCode.FORBIDDEN_OPERATION); return ResponseUtils.writeErrorInfo(response, ResultCode.FORBIDDEN_OPERATION);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册