Skip to content

Commit

Permalink
hotfix: 채팅 웹소켓 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeBin2019 committed Nov 15, 2024
1 parent 73b236d commit 3d3984f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}

0 comments on commit 3d3984f

Please sign in to comment.