Skip to content

Commit

Permalink
Merge pull request #148 from kakao-tech-campus-2nd-step3/week10
Browse files Browse the repository at this point in the history
[HOTFIX]
  • Loading branch information
JaeBin2019 authored Nov 15, 2024
2 parents 9437c10 + 3d3984f commit 2fed890
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 2fed890

Please sign in to comment.