diff --git a/webflux/src/main/java/org/springframework/security/web/server/util/matcher/PathMatcherServerWebExchangeMatcher.java b/webflux/src/main/java/org/springframework/security/web/server/util/matcher/PathMatcherServerWebExchangeMatcher.java index 8c59dcb5ed..33016cba2f 100644 --- a/webflux/src/main/java/org/springframework/security/web/server/util/matcher/PathMatcherServerWebExchangeMatcher.java +++ b/webflux/src/main/java/org/springframework/security/web/server/util/matcher/PathMatcherServerWebExchangeMatcher.java @@ -56,7 +56,7 @@ public final class PathMatcherServerWebExchangeMatcher implements ServerWebExcha if(this.method != null && !this.method.equals(request.getMethod())) { return MatchResult.notMatch(); } - String path = request.getPathWithinApplication(); + String path = request.getPath().pathWithinApplication().value(); boolean match = pathMatcher.match(pattern, path); if(!match) { return MatchResult.notMatch();