Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
sdikyarts committed May 26, 2024
1 parent 1a1055a commit c24c955
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
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;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
Expand All @@ -22,8 +21,7 @@ public SecurityConfig(JWTUtils jwtUtils) {

@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws Exception {
httpSecurity.csrf(AbstractHttpConfigurer::disable)
.cors(Customizer.withDefaults())
httpSecurity.cors(Customizer.withDefaults())
.authorizeHttpRequests(authorizeRequests ->
authorizeRequests.requestMatchers("/admin/**", "/public/**").permitAll()
.anyRequest().authenticated())
Expand Down

0 comments on commit c24c955

Please sign in to comment.