openvidu-server: fix checkWebsocketUri wss protocol condition

pull/419/head
Alexander 2020-04-03 16:25:29 +03:00
parent 534f838488
commit f4bda443f4
1 changed files with 2 additions and 2 deletions

View File

@ -381,7 +381,7 @@ public class OpenviduConfig {
public URI checkWebsocketUri(String uri) throws Exception { public URI checkWebsocketUri(String uri) throws Exception {
try { try {
if (!uri.startsWith("ws://") || !uri.startsWith("wss://")) { if (!uri.startsWith("ws://") && !uri.startsWith("wss://")) {
throw new Exception("WebSocket protocol not found"); throw new Exception("WebSocket protocol not found");
} }
String parsedUri = uri.replaceAll("^ws://", "http://").replaceAll("^wss://", "https://"); 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(", ")) + "]"; return "[" + list.stream().map(s -> "\"" + s + "\"").collect(Collectors.joining(", ")) + "]";
} }
} }