Commit f05a66f8e4dcab5dbfbd70cf3ebbdb68013f3a1d
1 parent
a5e30da7
fix:CacheRequestBodyFilter 导致 Spring Boot Admin 无法修改日志级别,https://github.com/Yuna…
…iV/ruoyi-vue-pro/issues/795
Showing
1 changed file
with
2 additions
and
2 deletions
yudao-framework/yudao-spring-boot-starter-web/src/main/java/cn/iocoder/yudao/framework/web/core/filter/CacheRequestBodyFilter.java
| ... | ... | @@ -23,7 +23,7 @@ public class CacheRequestBodyFilter extends OncePerRequestFilter { |
| 23 | 23 | * 1. 排除 Spring Boot Admin 相关请求,避免客户端连接中断导致的异常。 |
| 24 | 24 | * 例如说:<a href="https://github.com/YunaiV/ruoyi-vue-pro/issues/795">795 ISSUE</a> |
| 25 | 25 | */ |
| 26 | - private static final String[] IGNORE_URIS = {"/admin", "/actuator"}; | |
| 26 | + private static final String[] IGNORE_URIS = {"/admin/", "/actuator/"}; | |
| 27 | 27 | |
| 28 | 28 | @Override |
| 29 | 29 | protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) |
| ... | ... | @@ -35,7 +35,7 @@ public class CacheRequestBodyFilter extends OncePerRequestFilter { |
| 35 | 35 | protected boolean shouldNotFilter(HttpServletRequest request) { |
| 36 | 36 | // 1. 校验是否为排除的 URL |
| 37 | 37 | String requestURI = request.getRequestURI(); |
| 38 | - if (StrUtil.containsAny(requestURI, IGNORE_URIS)) { | |
| 38 | + if (StrUtil.startWithAny(requestURI, IGNORE_URIS)) { | |
| 39 | 39 | return true; |
| 40 | 40 | } |
| 41 | 41 | ... | ... |