File tree Expand file tree Collapse file tree
src/main/java/ita/tinybite/global/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import org .springframework .web .socket .config .annotation .EnableWebSocketMessageBroker ;
1010import org .springframework .web .socket .config .annotation .StompEndpointRegistry ;
1111import org .springframework .web .socket .config .annotation .WebSocketMessageBrokerConfigurer ;
12+ import org .springframework .web .socket .server .support .DefaultHandshakeHandler ;
1213
1314@ Slf4j
1415@ Configuration
@@ -27,7 +28,9 @@ public void configureMessageBroker(MessageBrokerRegistry registry) {
2728 @ Override
2829 public void registerStompEndpoints (StompEndpointRegistry registry ) {
2930 registry .addEndpoint ("/ws-chat" )
30- .setAllowedOriginPatterns ("*" );
31+ .setAllowedOriginPatterns ("*" )
32+ .setHandshakeHandler (new DefaultHandshakeHandler ())
33+ ;
3134 }
3235
3336 @ Override
You can’t perform that action at this time.
0 commit comments