Expected Behavior

PathPatternParserServerWebExchangeMatcher matcher = new PathPatternParserServerWebExchangeMatcher("/pattern1/**","/pattern2/**")

Current Behavior

PathPatternParserServerWebExchangeMatcher matcher = new PathPatternParserServerWebExchangeMatcher("/pattern1/**")

Context Existing behaviour only accepts single string pattern, where it becomes difficult to pass multiple path patterns to PathPatternParserServerWebExchangeMatcher

Allow to pass multiple path patterns to PathPatternParserServerWebExchangeMatcher and implement

public Mono<MatchResult> matches(ServerWebExchange exchange) 

method to check the incoming exchange matches with list of patterns.

Comment From: onjik

good advice

Comment From: AugustoKlaic

This is a must hahaha : P

Comment From: jzheaux

Have you already tried using ServerWebExchangeMatchers.pathMatchers? This will return an ServerWebExchangeMatcher instance that considers the list of paths you provide. Alternatively, you can use OrServerWebExchangeMatcher to compose a set of matchers.

Or, if you are using ServerHttpSecurity, in many cases, you can simply provide the list of strings to the DSL like so:

http
    .authorizeExchange((authorize) -> authorize.pathMatchers("/my", "/app", "/endpoints").hasAuthority("USER"))
    // ...

Does one of those options address your concern, or is there a need that I'm not understanding?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.