From e634164f1d72eeb1311ea16bcde9072c6b1d8ff9 Mon Sep 17 00:00:00 2001 From: Jaime Diaz Date: Thu, 4 Oct 2018 13:50:27 +0200 Subject: [PATCH] #689 fixing h2 console --- .../general/service/impl/config/BaseWebSecurityConfig.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/server/src/main/resources/archetype-resources/core/src/main/java/__packageInPathFormat__/general/service/impl/config/BaseWebSecurityConfig.java b/templates/server/src/main/resources/archetype-resources/core/src/main/java/__packageInPathFormat__/general/service/impl/config/BaseWebSecurityConfig.java index b62f3ee8f..fe826baa4 100644 --- a/templates/server/src/main/resources/archetype-resources/core/src/main/java/__packageInPathFormat__/general/service/impl/config/BaseWebSecurityConfig.java +++ b/templates/server/src/main/resources/archetype-resources/core/src/main/java/__packageInPathFormat__/general/service/impl/config/BaseWebSecurityConfig.java @@ -88,6 +88,10 @@ public void configure(HttpSecurity http) throws Exception { // register login and logout filter that handles rest logins .addFilterAfter(getSimpleRestAuthenticationFilter(), BasicAuthenticationFilter.class) .addFilterAfter(getSimpleRestLogoutFilter(), LogoutFilter.class); + + // uncomment these lines to enable h2 console + // http.csrf().disable(); + // http.headers().frameOptions().disable(); if (this.corsEnabled) { http.addFilterBefore(getCorsFilter(), CsrfFilter.class);