From 6c38a328f3ad7a411dd0ee8fb7795f044eca5d1c Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Sat, 21 Dec 2024 15:17:20 +0100 Subject: [PATCH] disable CSRF --- .../net/hostsharing/hsadminng/config/WebSecurityConfig.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/hostsharing/hsadminng/config/WebSecurityConfig.java b/src/main/java/net/hostsharing/hsadminng/config/WebSecurityConfig.java index 6c91ce17..d279ae12 100644 --- a/src/main/java/net/hostsharing/hsadminng/config/WebSecurityConfig.java +++ b/src/main/java/net/hostsharing/hsadminng/config/WebSecurityConfig.java @@ -5,6 +5,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.web.SecurityFilterChain; @Configuration @@ -22,6 +23,7 @@ public class WebSecurityConfig { .requestMatchers("/actuator/**").permitAll() .anyRequest().authenticated() ) + .csrf(AbstractHttpConfigurer::disable) .build(); }