Pre Merge pull request !192 from twelvet/N/A

This commit is contained in:
twelvet 2024-01-11 07:47:56 +00:00 committed by Gitee
commit 0fececc3b6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 0 deletions

View File

@ -46,6 +46,11 @@ public class AuthFilter implements GlobalFilter, Ordered
ServerHttpRequest.Builder mutate = request.mutate(); ServerHttpRequest.Builder mutate = request.mutate();
String url = request.getURI().getPath(); String url = request.getURI().getPath();
if (url.endsWith("/")) {
url = url.substring(0, url.length() - 1);
}
// 跳过不需要验证的路径 // 跳过不需要验证的路径
if (StringUtils.matches(url, ignoreWhite.getWhites())) if (StringUtils.matches(url, ignoreWhite.getWhites()))
{ {