mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server: fix checkWebsocketUri wss protocol condition
parent
534f838488
commit
f4bda443f4
|
@ -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(", ")) + "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue