Skip to content

Commit

Permalink
Merge pull request #919 from terrestris/http-proxy-fix
Browse files Browse the repository at this point in the history
fix(HttpProxy): use override instead of bean creation for HttpSecurity
  • Loading branch information
ahennr authored Sep 11, 2024
2 parents 12fb04b + 62cd974 commit aa253ce
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}

0 comments on commit aa253ce

Please sign in to comment.