BAEL-89 remove csrf disable

This commit is contained in:
tschiman 2016-11-05 17:35:46 +01:00 committed by slavisa-baeldung
parent 8daa90f3de
commit 9938a1a0c7
2 changed files with 1 additions and 3 deletions

View File

@ -16,7 +16,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
.sessionManagement() .sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.NEVER) .sessionCreationPolicy(SessionCreationPolicy.NEVER)
.and() .and()
.authorizeRequests().anyRequest().hasRole("ADMIN").and() .authorizeRequests().anyRequest().hasRole("ADMIN").and();
.httpBasic().disable();
} }
} }

View File

@ -22,7 +22,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
protected void configure(HttpSecurity http) throws Exception { protected void configure(HttpSecurity http) throws Exception {
http http
.httpBasic().and() .httpBasic().and()
// .csrf().disable()
.authorizeRequests() .authorizeRequests()
.antMatchers("/").permitAll() .antMatchers("/").permitAll()
.antMatchers("/tomcat").hasRole("USER") .antMatchers("/tomcat").hasRole("USER")