Код: Выделить всё
@Bean
public SecurityWebFilterChain securityFilterChain(ServerHttpSecurity http) throws Exception {
log.info("Request enters into API Gateway");
http.csrf(ServerHttpSecurity.CsrfSpec::disable)
.authorizeExchange(authorizeExchangeSpec -> authorizeExchangeSpec
.pathMatchers("/auth/api/v1/cred/**").permitAll().anyExchange().authenticated())
.addFilterBefore(tokenValidation, SecurityWebFiltersOrder.AUTHENTICATION)
.addFilterAfter(addXTrustedSourceHeaderFilter, SecurityWebFiltersOrder.AUTHENTICATION)
.httpBasic(HttpBasicSpec::disable)
.formLogin(FormLoginSpec::disable);
return http.build();
}
Что мне не хватает? Почему запрос все еще достигает фильтра проверки токена, несмотря на использование метода PermitAll()?
Подробнее здесь: https://stackoverflow.com/questions/791 ... tpsecurity
Мобильная версия