Code: Select all
@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();
}
}
"Zugriff auf xmlhttprequest unter 'http: // localhost: 8080/hello-world/path-variable/msd' msd 'von Origin' http: // localhost: 4200 wurde nicht blockiert. Status. "