|
|
@ -24,7 +24,7 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { |
|
|
|
public void registerStompEndpoints(StompEndpointRegistry registry) { |
|
|
|
// 使用相对路径注册 WebSocket 端点 |
|
|
|
registry.addEndpoint("/ws") |
|
|
|
.setAllowedOrigins("http://localhost:8848","http://127.0.0.1:8848") |
|
|
|
.setAllowedOriginPatterns("*") |
|
|
|
.withSockJS(); |
|
|
|
} |
|
|
|
} |