fix: path bug

This commit is contained in:
CaiHQ
2021-10-26 11:22:45 +08:00
parent a117a53b0b
commit e96048de2a
8 changed files with 2837 additions and 18 deletions

View File

@@ -127,15 +127,7 @@ function getControlWsUrl(host) {
if (document.location.href.startsWith("https")) {
prefix = "wss://";
}
let path = document.location.pathname.lastIndexOf("/");
path = document.location.pathname.substr(0, path + 1);
if (path.indexOf("SCIDE") < 0) {
path += "SCIDE/";
}
path += "SCExecutor";
if (isBaaS) {
path = path.replace("ide/", "")
}
path = "/SCIDE/SCExecutor";
return prefix + host + path;
}