From 3b654dbf316e42de9ffaf59ad9a3ab507d55ffe7 Mon Sep 17 00:00:00 2001 From: koreaioi Date: Wed, 10 Jul 2024 00:22:30 +0900 Subject: [PATCH] feat: https cors --- .../java/hamsung/hamsung_project/config/SecurityConfig.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/hamsung/hamsung_project/config/SecurityConfig.java b/src/main/java/hamsung/hamsung_project/config/SecurityConfig.java index baed55d..8bf9802 100644 --- a/src/main/java/hamsung/hamsung_project/config/SecurityConfig.java +++ b/src/main/java/hamsung/hamsung_project/config/SecurityConfig.java @@ -60,7 +60,9 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) { CorsConfiguration configuration = new CorsConfiguration(); - configuration.setAllowedOrigins(Collections.singletonList("http://localhost:3000")); + //configuration.setAllowedOrigins(Collections.singletonList("http://localhost:3000")); + configuration.setAllowedOrigins(Arrays.asList("http://localhost:3000", "https://localhost:3000")); + configuration.setAllowedMethods(Collections.singletonList("*")); configuration.setAllowCredentials(true); configuration.setAllowedHeaders(Collections.singletonList("*"));