Skip to content

Commit

Permalink
chore: code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
shah committed Jul 16, 2024
1 parent 929288d commit 499ff55
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package org.techbd.service.http;

import java.util.Arrays;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.security.config.Customizer;
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;
Expand All @@ -14,9 +13,6 @@
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import org.springframework.web.filter.ForwardedHeaderFilter;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.web.authentication.AnonymousAuthenticationFilter;
import org.springframework.security.core.authority.AuthorityUtils;

@Configuration
@EnableWebSecurity
Expand All @@ -31,7 +27,7 @@ public SecurityFilterChain securityFilterChain(final HttpSecurity http) throws E
.csrf(AbstractHttpConfigurer::disable);
// allow us to show our own content in IFRAMEs (e.g. Swagger, etc.)
http.headers(headers -> headers.frameOptions(frameOptions -> frameOptions.sameOrigin()));
http.anonymous();
http.anonymous(Customizer.withDefaults());
return http.build();
}

Expand Down

0 comments on commit 499ff55

Please sign in to comment.