From a1f65d4693fb775a228ad54c91b6ccf2cb5f983a Mon Sep 17 00:00:00 2001 From: mscarsel Date: Fri, 17 Jan 2025 20:01:13 +0100 Subject: [PATCH] [P4ADEV-1811] fixed WebSecurityConfig --- .../it/gov/pagopa/pu/fileshare/FileShareApplication.java | 3 ++- .../gov/pagopa/pu/fileshare/security/WebSecurityConfig.java | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/it/gov/pagopa/pu/fileshare/FileShareApplication.java b/src/main/java/it/gov/pagopa/pu/fileshare/FileShareApplication.java index 4454bcd..d2214bd 100644 --- a/src/main/java/it/gov/pagopa/pu/fileshare/FileShareApplication.java +++ b/src/main/java/it/gov/pagopa/pu/fileshare/FileShareApplication.java @@ -3,8 +3,9 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration; +import org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration; -@SpringBootApplication(exclude = UserDetailsServiceAutoConfiguration.class) +@SpringBootApplication(exclude = {UserDetailsServiceAutoConfiguration.class, ErrorMvcAutoConfiguration.class}) public class FileShareApplication { public static void main(String[] args) { diff --git a/src/main/java/it/gov/pagopa/pu/fileshare/security/WebSecurityConfig.java b/src/main/java/it/gov/pagopa/pu/fileshare/security/WebSecurityConfig.java index 9137743..4abea17 100644 --- a/src/main/java/it/gov/pagopa/pu/fileshare/security/WebSecurityConfig.java +++ b/src/main/java/it/gov/pagopa/pu/fileshare/security/WebSecurityConfig.java @@ -37,11 +37,6 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti "/actuator/**" ).permitAll() - // WebMVC - .requestMatchers( - "/error" - ).permitAll() - .anyRequest().authenticated() ) .sessionManagement(session -> session