disable csrf + headers.frameoptions, permit /h2-console/**
This commit is contained in:
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user