From 3d3984f0a4fa9a665b903c715323d0f1d5e2c85c Mon Sep 17 00:00:00 2001 From: JaeBin <201924576@pusan.ac.kr> Date: Fri, 15 Nov 2024 09:51:11 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20=EC=B1=84=ED=8C=85=20=EC=9B=B9?= =?UTF-8?q?=EC=86=8C=EC=BC=93=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/boomerang/global/config/WebSocketConfig.java | 4 +++- .../boomerang/global/config/WebSocketStompBrokerConfig.java | 6 ------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/boomerang/src/main/java/boomerang/global/config/WebSocketConfig.java b/boomerang/src/main/java/boomerang/global/config/WebSocketConfig.java index 5cd8a262..bf33453e 100644 --- a/boomerang/src/main/java/boomerang/global/config/WebSocketConfig.java +++ b/boomerang/src/main/java/boomerang/global/config/WebSocketConfig.java @@ -30,6 +30,8 @@ public WebSocketConfig(JwtUtil jwtUtil, MemberService memberService, ChatRoomSer @Override public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(new ChatWebSocketHandler(chatRoomService), "/ws/chat/*") - .addInterceptors(new WebSocketHandshakeInterceptor(jwtUtil, memberService, chatRoomService, consultationService)); + .addInterceptors(new WebSocketHandshakeInterceptor(jwtUtil, memberService, chatRoomService, consultationService)) + .setAllowedOrigins("http://localhost:8080", "http://localhost:5173", "http://54.252.224.76:80") + .withSockJS(); } } diff --git a/boomerang/src/main/java/boomerang/global/config/WebSocketStompBrokerConfig.java b/boomerang/src/main/java/boomerang/global/config/WebSocketStompBrokerConfig.java index 303c588d..c222a489 100644 --- a/boomerang/src/main/java/boomerang/global/config/WebSocketStompBrokerConfig.java +++ b/boomerang/src/main/java/boomerang/global/config/WebSocketStompBrokerConfig.java @@ -35,12 +35,6 @@ public void registerStompEndpoints(StompEndpointRegistry registry) { .addInterceptors(new JwtHandshakeInterceptor(jwtUtil)) .setHandshakeHandler(new WebSocketHandShakeHandler()) .withSockJS(); - - registry.addEndpoint("/ws/chat/{roomId}") - .setAllowedOrigins("http://localhost:8080", "http://localhost:5173", "http://54.252.224.76:80") - .addInterceptors(new JwtHandshakeInterceptor(jwtUtil)) - .setHandshakeHandler(new WebSocketHandShakeHandler()) - .withSockJS(); } } \ No newline at end of file