From cb0be125f21523d11dcf644b3356d5631747e444 Mon Sep 17 00:00:00 2001 From: kchaeeun Date: Wed, 21 Aug 2024 13:39:47 +0900 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=9A=91=20[HOTFIX]=20CORS=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=EC=9E=84=EC=8B=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/majorLink/global/config/SecurityConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/majorLink/src/main/java/com/example/majorLink/global/config/SecurityConfig.java b/majorLink/src/main/java/com/example/majorLink/global/config/SecurityConfig.java index 5d0b89d..c77221a 100644 --- a/majorLink/src/main/java/com/example/majorLink/global/config/SecurityConfig.java +++ b/majorLink/src/main/java/com/example/majorLink/global/config/SecurityConfig.java @@ -28,6 +28,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http .httpBasic(AbstractHttpConfigurer::disable) // http form login 비활성화 .csrf(AbstractHttpConfigurer::disable) // csrf 필터 비활성화 -> cookies 사용하지 않으므로 위험 없음 + .cors(AbstractHttpConfigurer::disable) .formLogin(AbstractHttpConfigurer::disable) // basic login 비활성화 .sessionManagement(sessionManagement -> sessionManagement.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) // session 사용 X .addFilterBefore(new JwtAuthenticationFilter(jwtService), UsernamePasswordAuthenticationFilter.class)