Код: Выделить всё
@Configuration
@EnableWebSecurity
public class SpringSecurityConfigurationBasicAuth extends WebSecurityConfigurerAdapter{
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.csrf().disable()
.authorizeRequests()
.antMatchers(HttpMethod.OPTIONS,"/**").permitAll()
.anyRequest().authenticated()
.and()
//.formLogin().and()
.httpBasic();
}
}
"доступ к Xmlhttprequest at 'http: // localhost: 8080/hello-world/path-variable/msd' from inory 'http: // localhost: 4200'. Статус. "
Подробнее здесь: https://stackoverflow.com/questions/569 ... oesnt-pass