File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
gotcha-auth/src/main/java/gotcha_auth/config Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 1717import org .springframework .security .crypto .password .PasswordEncoder ;
1818import org .springframework .security .web .SecurityFilterChain ;
1919import org .springframework .security .web .authentication .UsernamePasswordAuthenticationFilter ;
20- import org .springframework .security .web .csrf .CookieCsrfTokenRepository ;
21- import org .springframework .security .web .csrf .CsrfTokenRequestAttributeHandler ;
2220import org .springframework .web .cors .CorsConfigurationSource ;
2321
2422@ Configuration
@@ -29,8 +27,6 @@ public class SecurityConfig {
2927 private final JwtExceptionFilter jwtExceptionFilter ;
3028 private final CorsConfigurationSource corsConfigurationSource ;
3129 private final CustomAccessDeniedHandler accessDeniedHandler ;
32- private final CookieCsrfTokenRepository csrfTokenRepository ;
33- private final CsrfTokenRequestAttributeHandler csrfTokenRequestAttributeHandler ;
3430
3531 @ Bean
3632 PasswordEncoder passwordEncoder () {
@@ -41,9 +37,7 @@ PasswordEncoder passwordEncoder() {
4137 public SecurityFilterChain securityFilterChain (HttpSecurity http ) throws Exception {
4238
4339 http
44- .csrf (csrf -> csrf
45- .csrfTokenRepository (csrfTokenRepository )
46- .csrfTokenRequestHandler (csrfTokenRequestAttributeHandler ))
40+ .csrf (AbstractHttpConfigurer ::disable )
4741 .headers (headers -> headers
4842 .frameOptions (frameOptions -> frameOptions .disable ()) // 여기 추가
4943 )
You can’t perform that action at this time.
0 commit comments