1

Merge pull request #29 from hhu-propra2/adapt-spring-security-to-h2-console

disable csrf + headers.frameoptions, permit /h2-console/**
This commit is contained in:
killerber4t
2020-03-05 14:09:35 +01:00
committed by GitHub

View File

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