diff --git a/boomerang/src/main/java/boomerang/global/config/WebConfig.java b/boomerang/src/main/java/boomerang/global/config/WebConfig.java index 00faaaa..f606357 100644 --- a/boomerang/src/main/java/boomerang/global/config/WebConfig.java +++ b/boomerang/src/main/java/boomerang/global/config/WebConfig.java @@ -20,8 +20,11 @@ public void addFormatters(FormatterRegistry registry) { public void addCorsMappings(CorsRegistry corsRegistry) { corsRegistry.addMapping("/**") // 8080 추가 - .allowedOrigins("http://localhost:5173", "http://localhost:8080", - "http://54.252.224.76:80", "http://54.252.224.76") + .allowedOrigins("http://localhost:5173", + "http://localhost:8080", + "http://54.252.224.76:80", + "http://54.252.224.76", + "http://52.79.80.3:8080") .allowedMethods("GET", "POST", "PUT", "DELETE") .allowedHeaders("*") .allowCredentials(true) diff --git a/boomerang/src/main/java/boomerang/global/config/WebSocketConfig.java b/boomerang/src/main/java/boomerang/global/config/WebSocketConfig.java index bf33453..a0e67f7 100644 --- a/boomerang/src/main/java/boomerang/global/config/WebSocketConfig.java +++ b/boomerang/src/main/java/boomerang/global/config/WebSocketConfig.java @@ -31,7 +31,10 @@ public WebSocketConfig(JwtUtil jwtUtil, MemberService memberService, ChatRoomSer public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(new ChatWebSocketHandler(chatRoomService), "/ws/chat/*") .addInterceptors(new WebSocketHandshakeInterceptor(jwtUtil, memberService, chatRoomService, consultationService)) - .setAllowedOrigins("http://localhost:8080", "http://localhost:5173", "http://54.252.224.76:80") - .withSockJS(); + .setAllowedOrigins("http://localhost:8080", + "http://localhost:5173", + "http://54.252.224.76:80", + "http://52.79.80.3:8080") + ; } }