Skip to content

Commit a4c92d4

Browse files
authored
Refactor/101 room detail (#118)
* feat: cors 설정 * 웹소켓 * 웹소켓 * 웹소켓 * 웹소켓 * 웹소켓 * 웹소켓 * 인터셉터, 핸들러 재추가 * 핸들러 다시 추가
1 parent ab1ebb5 commit a4c92d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/oronaminc/join/websocket/config/WebSocketConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
1111
import org.springframework.web.socket.config.annotation.WebSocketTransportRegistration;
1212
import org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory;
13+
import org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor;
1314

1415
import com.oronaminc.join.websocket.handshake.CustomHandshakeHandler;
1516
import com.oronaminc.join.websocket.session.CustomWebSocketHandlerDecorator;
@@ -49,9 +50,9 @@ public void registerStompEndpoints(StompEndpointRegistry registry) {
4950
registry.addEndpoint("/ws")
5051
.setAllowedOriginPatterns("*")
5152
// websocket 연결 전 쿠키 체크
52-
// .addInterceptors(new HttpSessionHandshakeInterceptor())
53+
.addInterceptors(new HttpSessionHandshakeInterceptor())
5354
// websocket 연결 후 principal 생성
54-
// .setHandshakeHandler(handshakeHandler)
55+
.setHandshakeHandler(handshakeHandler)
5556
.withSockJS();
5657

5758
registry.addEndpoint("/ws")

0 commit comments

Comments
 (0)