feat(SecurityGlobalFilter.class): 正式环境放行app的put请求

This commit is contained in:
有来技术 2021-10-20 00:54:30 +08:00
parent 831b3e45f0
commit c85598ab08

View File

@ -51,9 +51,10 @@ public class SecurityGlobalFilter implements GlobalFilter, Ordered {
// 线上演示环境禁止修改和删除
if (env.equals("prod") && !SecurityConstants.LOGOUT_PATH.equals(request.getPath().toString())
&& (
HttpMethod.DELETE.toString().equals(request.getMethodValue()) // 删除方法
String requestPath = request.getPath().toString();
if (env.equals("prod") && !SecurityConstants.LOGOUT_PATH.equals(requestPath)
&& !StrUtil.contains(requestPath, "app-api")
&& (HttpMethod.DELETE.toString().equals(request.getMethodValue()) // 删除方法
|| HttpMethod.PUT.toString().equals(request.getMethodValue())// 修改方法
|| SecurityConstants.SAVE_MENU_PATH.equals(request.getPath().toString()) // 新增路由
)) {