From 62cd9743252e21274af5a01fb88e514d25f4f16a Mon Sep 17 00:00:00 2001 From: Andre Henn Date: Wed, 11 Sep 2024 13:28:58 +0200 Subject: [PATCH] fix(HttpProxy): use override instead of bean creation for HttpSecurity --- .../shogun/config/HttpProxyWebSecurityConfig.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/shogun-proxy/src/main/java/de/terrestris/shogun/config/HttpProxyWebSecurityConfig.java b/shogun-proxy/src/main/java/de/terrestris/shogun/config/HttpProxyWebSecurityConfig.java index d91ada1d..c031b8a7 100644 --- a/shogun-proxy/src/main/java/de/terrestris/shogun/config/HttpProxyWebSecurityConfig.java +++ b/shogun-proxy/src/main/java/de/terrestris/shogun/config/HttpProxyWebSecurityConfig.java @@ -16,22 +16,19 @@ */ package de.terrestris.shogun.config; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.web.SecurityFilterChain; @Configuration public class HttpProxyWebSecurityConfig implements DefaultWebSecurityConfig { - @Bean - public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { + @Override + public void customHttpConfiguration(HttpSecurity http) throws Exception { http .authorizeHttpRequests((auths) -> auths .anyRequest() .authenticated() ); - return http.build(); } }