From 0fa2e99bb3f630b35d39e5e637d599ff2cd89331 Mon Sep 17 00:00:00 2001 From: moonjin-kim Date: Mon, 29 Apr 2024 20:01:49 +0900 Subject: [PATCH] fix: cors check --- .../java/com/sideProject/PlanIT/config/SecurityConfig.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sideProject/PlanIT/config/SecurityConfig.java b/src/main/java/com/sideProject/PlanIT/config/SecurityConfig.java index 697bf08..90f263d 100644 --- a/src/main/java/com/sideProject/PlanIT/config/SecurityConfig.java +++ b/src/main/java/com/sideProject/PlanIT/config/SecurityConfig.java @@ -47,7 +47,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { @Override public CorsConfiguration getCorsConfiguration(HttpServletRequest request) { CorsConfiguration config = new CorsConfiguration(); - config.setAllowedOrigins(Collections.singletonList("http://localhost:3000")); + config.setAllowedOrigins(Collections.singletonList("https://plan-it-jkkkp.netlify.app")); config.setAllowedMethods(List.of("GET", "POST", "DELETE", "PUT")); config.setAllowCredentials(true); config.setAllowedHeaders(Collections.singletonList("*")); @@ -64,6 +64,7 @@ public CorsConfiguration getCorsConfiguration(HttpServletRequest request) { }) .authorizeHttpRequests((authorizeRequests) -> authorizeRequests .requestMatchers( + "/", "/member/signin", "/member/signup", "/member/refresh",