Skip to content

Commit

Permalink
fix :: 로그인 시 403 에러 해결을 위한 Security Config ignoring 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
hyundong-L committed Nov 27, 2024
1 parent a524c27 commit 7562cd9
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.springframework.context.annotation.Configuration;
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.configuration.WebSecurityCustomizer;
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.SecurityFilterChain;
Expand Down Expand Up @@ -52,11 +53,11 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
return http.build();
}

// @Bean
// public WebSecurityCustomizer webSecurityCustomizer() {
// return webSecurity -> webSecurity.ignoring()
// .requestMatchers("/swagger-ui/**", "/v3/api-docs/**", "/api/auth/**");
// }
@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
return webSecurity -> webSecurity.ignoring()
.requestMatchers("/swagger-ui/**", "/v3/api-docs/**", "/api/auth/**");
}

@Bean
public CorsConfigurationSource corsConfigurationSource() {
Expand Down

0 comments on commit 7562cd9

Please sign in to comment.