1

disable csrf + headers.frameoptions, permit /h2-console/**

This commit is contained in:
Christoph
2020-03-05 14:07:41 +01:00
parent 63e1c3027d
commit 3842ee1739

View File

@ -61,12 +61,17 @@ class SecurityConfig extends KeycloakWebSecurityConfigurerAdapter {
.hasRole("monitoring") .hasRole("monitoring")
.and() .and()
.authorizeRequests() .authorizeRequests()
.antMatchers("h2-console/**") .antMatchers("/h2-console/**")
.permitAll() .permitAll()
.anyRequest() .anyRequest()
.permitAll(); .permitAll();
http.csrf().disable();
http.headers().frameOptions().disable();
} }
/** /**
* Declaring this class enables us to use the Spring specific * Declaring this class enables us to use the Spring specific
* {@link org.springframework.security.access.annotation.Secured} annotation * {@link org.springframework.security.access.annotation.Secured} annotation