From f4bda443f40b4157a97fa039a4faee869073ee60 Mon Sep 17 00:00:00 2001 From: Alexander Date: Fri, 3 Apr 2020 16:25:29 +0300 Subject: [PATCH] openvidu-server: fix checkWebsocketUri wss protocol condition --- .../main/java/io/openvidu/server/config/OpenviduConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +}