diff --git a/src/main/java/app/websocket/configuration/WebSocketConfig.java b/src/main/java/app/websocket/configuration/WebSocketConfig.java index 6397190..08a6f96 100644 --- a/src/main/java/app/websocket/configuration/WebSocketConfig.java +++ b/src/main/java/app/websocket/configuration/WebSocketConfig.java @@ -24,7 +24,7 @@ public class WebSocketConfig implements WebSocketConfigurer { public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { handlers.forEach(hndl -> { logger.info("Found websocket bean: {}", hndl.getPath()); - registry.addHandler((WebSocketHandler) hndl, "/ws/" + hndl.getPath()); + registry.addHandler((WebSocketHandler) hndl, "/ws/" + hndl.getPath()).setAllowedOrigins("*"); }); } }