I found this tutorial to secure Spring Cloud Gateway. It works well, but I would like to allow access to unregistered users to specific URLs (let's say /public).
I modified the example as follow:
public class SecurityConfig {
@Bean
SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) throws Exception {
http
.authorizeExchange()
.pathMatchers("/resource")
.permitAll();
return http.build();
}
}
But this doesn't do the trick as it appears the Gateway intercepts any traffic and redirects to the login page.
Is that normal and just the way UAA works or am I missing something here?
question from:
https://stackoverflow.com/questions/65849514/public-urls-with-spring-cloud-gateway-secure-by-uaa 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…