From e7384f55cfa084c9f952274195350557352330cd Mon Sep 17 00:00:00 2001 From: kchaeeun Date: Tue, 20 Aug 2024 02:19:00 +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=B4=20=EA=B6=8C=ED=95=9C=20?= =?UTF-8?q?=EC=88=98=EC=A0=954?= 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)