From 1c77dd0fd909305cf9b2a05aaaf872279002663f Mon Sep 17 00:00:00 2001 From: joonghyun Date: Thu, 27 Jun 2024 22:06:34 +0900 Subject: [PATCH] =?UTF-8?q?#28=20fix:=20allowedOrigins=EC=97=90=20?= =?UTF-8?q?=EB=B0=B0=ED=8F=AC=20url=20=EC=B6=94=EA=B0=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ollie/wecare/common/configuration/WebConfiguration.java | 2 +- .../wecare/common/configuration/WebSecurityConfiguration.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ollie/wecare/common/configuration/WebConfiguration.java b/src/main/java/ollie/wecare/common/configuration/WebConfiguration.java index d35407a..633f81d 100644 --- a/src/main/java/ollie/wecare/common/configuration/WebConfiguration.java +++ b/src/main/java/ollie/wecare/common/configuration/WebConfiguration.java @@ -10,7 +10,7 @@ public class WebConfiguration implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOrigins("http://localhost:8080", "http://localhost:3000", "https://team-ollie.github.io/WeCare-FE") + .allowedOrigins("http://localhost:8080", "http://localhost:3000", "https://team-ollie.github.io/WeCare-FE", "https://team-ollie.github.io") .allowedMethods("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS") .allowedHeaders("*") .allowCredentials(true); diff --git a/src/main/java/ollie/wecare/common/configuration/WebSecurityConfiguration.java b/src/main/java/ollie/wecare/common/configuration/WebSecurityConfiguration.java index f6f066d..586accd 100644 --- a/src/main/java/ollie/wecare/common/configuration/WebSecurityConfiguration.java +++ b/src/main/java/ollie/wecare/common/configuration/WebSecurityConfiguration.java @@ -34,7 +34,7 @@ public class WebSecurityConfiguration { CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); configuration.setAllowedHeaders(List.of("*")); - configuration.setAllowedOrigins(List.of("http://localhost:8080", "http://localhost:3000", "https://team-ollie.github.io/WeCare-FE")); + configuration.setAllowedOrigins(List.of("http://localhost:8080", "http://localhost:3000", "https://team-ollie.github.io/WeCare-FE", "https://team-ollie.github.io")); configuration.setAllowedMethods(List.of("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS")); configuration.setAllowCredentials(true); UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();