I am using spring web-flux (spring-boot-starter-webflux - 2.7.5)
I am trying to update the pathMatchers pattern (spring security) for authentication programmatically but it is not taking any effect.
My declarative security config
http .csrf().disable() .authorizeExchange() .pathMatchers("index","/css/","js/", "/swagger-ui/", "/swagger-ui.html", "/swagger-resources/", "/v3/api-docs/", "/togglz-console/").permitAll() .pathMatchers("/v2/", "/server-1/", "/service-2/**").authenticated()
updating the pathMatchers programmatically
@Autowired ServerHttpSecurity serverHttpSecurity;
serverHttpSecurity.authorizeExchange().pathMatchers("").authenticated();
Could you help me why the update of pathMatchers is not taking any effect?
Comment From: sjohnr
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. We prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add a minimal sample that reproduces this issue if you feel this is a genuine bug.