diff --git a/openvidu-server/src/main/java/io/openvidu/server/config/OpenviduConfig.java b/openvidu-server/src/main/java/io/openvidu/server/config/OpenviduConfig.java index cf68d067..2f97cf55 100644 --- a/openvidu-server/src/main/java/io/openvidu/server/config/OpenviduConfig.java +++ b/openvidu-server/src/main/java/io/openvidu/server/config/OpenviduConfig.java @@ -381,7 +381,7 @@ public class OpenviduConfig { public URI checkWebsocketUri(String uri) throws Exception { try { - if (!uri.startsWith("ws://") || !uri.startsWith("wss://")) { + if (!uri.startsWith("ws://") && !uri.startsWith("wss://")) { throw new Exception("WebSocket protocol not found"); } String parsedUri = uri.replaceAll("^ws://", "http://").replaceAll("^wss://", "https://"); @@ -922,4 +922,4 @@ public class OpenviduConfig { return "[" + list.stream().map(s -> "\"" + s + "\"").collect(Collectors.joining(", ")) + "]"; } -} \ No newline at end of file +}