From b08133b2fb1fec543eed4ce0d5f774c8c541befe Mon Sep 17 00:00:00 2001 From: gsd Date: Mon, 15 Jan 2024 20:42:23 +0300 Subject: [PATCH] websocket support v3 fix --- src/main/java/app/websocket/configuration/WebSocketConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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("*"); }); } }