From 98d546d3b90a5db178a4219c720d5acb4086a0a9 Mon Sep 17 00:00:00 2001 From: yunjunghun0116 Date: Fri, 2 Aug 2024 13:20:13 +0900 Subject: [PATCH] =?UTF-8?q?rewrite:=20cors=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EC=9E=AC=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/gift/config/WebConfig.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/gift/config/WebConfig.java b/src/main/java/gift/config/WebConfig.java index 8ce315fa7..1abbc1761 100644 --- a/src/main/java/gift/config/WebConfig.java +++ b/src/main/java/gift/config/WebConfig.java @@ -27,9 +27,10 @@ public void addInterceptors(InterceptorRegistry registry) { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOrigins("http://localhost:3000", "http://localhost:8080") + .allowedOrigins("http://localhost:3000", "localhost:3000") .allowedMethods("GET", "POST", "PUT", "DELETE") .allowedHeaders("*") - .maxAge(1800); + .allowCredentials(true) + .maxAge(3600); } }