From a87b99106c98d72a8a2d9843eb149dc525cf4fe4 Mon Sep 17 00:00:00 2001 From: choiyounji Date: Tue, 14 Nov 2023 16:08:10 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20cors=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/MARKETFUBY/Global/config/WebConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/MARKETFUBY/Global/config/WebConfig.java b/src/main/java/MARKETFUBY/Global/config/WebConfig.java index 448cde8..344d35e 100644 --- a/src/main/java/MARKETFUBY/Global/config/WebConfig.java +++ b/src/main/java/MARKETFUBY/Global/config/WebConfig.java @@ -12,6 +12,8 @@ public class WebConfig implements WebMvcConfigurer { public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") .allowedOrigins("http://localhost:3000") - .allowedMethods("*"); + .allowedMethods("*") + .allowCredentials(true) // 쿠키 인증 요청 허용 + .maxAge(3600); // 원하는 시간만큼 pre-flight 리퀘스트를 캐싱 } }