diff --git a/src/main/java/jungle/HandTris/global/config/WebConfig.java b/src/main/java/jungle/HandTris/global/config/WebConfig.java index 2f0b475..3d3fde9 100644 --- a/src/main/java/jungle/HandTris/global/config/WebConfig.java +++ b/src/main/java/jungle/HandTris/global/config/WebConfig.java @@ -27,7 +27,7 @@ public WebMvcConfigurer corsConfigurer() { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**") - .allowedOrigins("http://localhost:3000", "https://handtris.vercel.app") + .allowedOrigins("http://localhost:3000", "https://handtris.vercel.app", "https://handtris-jungle.vercel.app") .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH") .allowedHeaders("content-type", "Authorization", "Authorization-Refresh", "x-requested-with") .exposedHeaders("Set-Cookie") diff --git a/src/main/java/jungle/HandTris/global/config/security/SecurityConfig.java b/src/main/java/jungle/HandTris/global/config/security/SecurityConfig.java index 4139436..ff3a2fc 100644 --- a/src/main/java/jungle/HandTris/global/config/security/SecurityConfig.java +++ b/src/main/java/jungle/HandTris/global/config/security/SecurityConfig.java @@ -2,7 +2,10 @@ import jungle.HandTris.application.service.CustomOAuth2MemberService; import jungle.HandTris.global.filter.JWTFilter; -import jungle.HandTris.global.handler.*; +import jungle.HandTris.global.handler.JWTAccessDeniedHandler; +import jungle.HandTris.global.handler.JWTAuthenticateDeniedHandler; +import jungle.HandTris.global.handler.OAuth2FailureHandler; +import jungle.HandTris.global.handler.OAuth2SuccessHandler; import jungle.HandTris.global.jwt.JWTUtil; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; @@ -72,7 +75,7 @@ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { @Bean CorsConfigurationSource corsConfigurationSource() { CorsConfiguration configuration = new CorsConfiguration(); - configuration.setAllowedOrigins(Arrays.asList("http://localhost:3000", "https://handtris.vercel.app")); + configuration.setAllowedOrigins(Arrays.asList("http://localhost:3000", "https://handtris.vercel.app", "https://handtris-jungle.vercel.app")); configuration.setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")); configuration.setAllowedHeaders(Arrays.asList("content-type", "Authorization", "Authorization-Refresh", "x-requested-with")); configuration.setAllowCredentials(true); diff --git a/src/main/java/jungle/HandTris/global/config/ws/StompConfig.java b/src/main/java/jungle/HandTris/global/config/ws/StompConfig.java index 54beece..c2ef844 100644 --- a/src/main/java/jungle/HandTris/global/config/ws/StompConfig.java +++ b/src/main/java/jungle/HandTris/global/config/ws/StompConfig.java @@ -27,7 +27,7 @@ public void configureMessageBroker(MessageBrokerRegistry config) { @Override public void registerStompEndpoints(StompEndpointRegistry registry) { // WebSocket 엔드포인트를 등록하고 SockJS를 활성화합니다. - registry.addEndpoint("/ws").setAllowedOrigins("http://localhost:3000", "https://handtris.vercel.app").withSockJS(); + registry.addEndpoint("/ws").setAllowedOrigins("http://localhost:3000", "https://handtris.vercel.app", "https://handtris-jungle.vercel.app").withSockJS(); } @Override