mirror of https://github.com/OpenVidu/openvidu.git
openvidu-server appends server.port to publicUrl if necessary
parent
d6fe6b570b
commit
7c29052e70
|
@ -24,5 +24,5 @@
|
||||||
"sourceMap": true
|
"sourceMap": true
|
||||||
},
|
},
|
||||||
//"buildOnSave": true,
|
//"buildOnSave": true,
|
||||||
"compileOnSave":true
|
"compileOnSave": true
|
||||||
}
|
}
|
|
@ -16,6 +16,7 @@
|
||||||
package io.openvidu.server;
|
package io.openvidu.server;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.kurento.jsonrpc.JsonUtils;
|
import org.kurento.jsonrpc.JsonUtils;
|
||||||
|
@ -168,11 +169,22 @@ public class OpenViduServer implements JsonRpcConfigurer {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
URL url = new URL(publicUrl);
|
||||||
|
int port = url.getPort();
|
||||||
|
|
||||||
type = "custom";
|
type = "custom";
|
||||||
OpenViduServer.publicUrl = publicUrl.replaceFirst("https://", "wss://");
|
OpenViduServer.publicUrl = publicUrl.replaceFirst("https://", "wss://");
|
||||||
if (!OpenViduServer.publicUrl.startsWith("wss://")) {
|
if (!OpenViduServer.publicUrl.startsWith("wss://")) {
|
||||||
OpenViduServer.publicUrl = "wss://" + OpenViduServer.publicUrl;
|
OpenViduServer.publicUrl = "wss://" + OpenViduServer.publicUrl;
|
||||||
}
|
}
|
||||||
|
if (OpenViduServer.publicUrl.endsWith("/")) {
|
||||||
|
OpenViduServer.publicUrl = OpenViduServer.publicUrl.substring(0, OpenViduServer.publicUrl.length() - 1);
|
||||||
|
}
|
||||||
|
if (port == -1) {
|
||||||
|
OpenViduServer.publicUrl += ":" + openviduConf.getServerPort();
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/language-service": "^4.2.4",
|
"@angular/language-service": "^4.2.4",
|
||||||
"@angular/cli": "1.6.3",
|
"@angular/cli": "1.4.3",
|
||||||
"@angular/compiler-cli": "^4.2.4",
|
"@angular/compiler-cli": "^4.2.4",
|
||||||
"@types/jasminewd2": "~2.0.2",
|
"@types/jasminewd2": "~2.0.2",
|
||||||
"@types/jasmine": "~2.5.53",
|
"@types/jasmine": "~2.5.53",
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
"karma-jasmine": "~1.1.0",
|
"karma-jasmine": "~1.1.0",
|
||||||
"karma-cli": "~1.0.1",
|
"karma-cli": "~1.0.1",
|
||||||
"karma-chrome-launcher": "2.2.0",
|
"karma-chrome-launcher": "2.2.0",
|
||||||
"typescript": "2.6.2",
|
"typescript": "2.3.3",
|
||||||
"karma-coverage-istanbul-reporter": "^1.3.0",
|
"karma-coverage-istanbul-reporter": "^1.3.0",
|
||||||
"karma": "1.7.1",
|
"karma": "1.7.1",
|
||||||
"karma-jasmine-html-reporter": "^0.2.2",
|
"karma-jasmine-html-reporter": "^0.2.2",
|
||||||
|
|
Loading…
Reference in New Issue