Код: Выделить всё
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http.authorizeHttpRequests(authorize -> authorize
.requestMatchers("/user/register").permitAll()
.anyRequest().authenticated());
http.httpBasic(Customizer.withDefaults());
http.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS));
http.csrf(customizer -> customizer.disable());
http.cors(customizer -> customizer.disable());
return http.build();
}
Может ли кто-нибудь мне помочь?
Ожидается: Я могу получить доступ к конечной точке «/user/register» без ошибки 401
Подробнее здесь: https://stackoverflow.com/questions/791 ... ing-access
Мобильная версия