From 2f2cf059be36e93bd428e780d3b49f9a90bcc7d4 Mon Sep 17 00:00:00 2001 From: "Frank.R.Wu" Date: Wed, 16 Jun 2021 23:54:23 +0800 Subject: [PATCH] fix --- js/NodePortal.js | 3 +++ js/OnlineIDE.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/js/NodePortal.js b/js/NodePortal.js index e3b4a1c..54b63e9 100644 --- a/js/NodePortal.js +++ b/js/NodePortal.js @@ -267,6 +267,9 @@ function getControlWsUrl(host) { path += "SCIDE/"; } path += "SCExecutor"; + if (isBaaS) { + path = path.replace("ide/", "") + } return prefix + host + path; } diff --git a/js/OnlineIDE.js b/js/OnlineIDE.js index d3a40c7..8edd28a 100644 --- a/js/OnlineIDE.js +++ b/js/OnlineIDE.js @@ -129,9 +129,13 @@ function getControlWsUrl(host) { } let path = document.location.pathname.lastIndexOf("/"); path = document.location.pathname.substr(0, path + 1); - if (path.indexOf("SCIDE") < 0) + if (path.indexOf("SCIDE") < 0) { path += "SCIDE/"; + } path += "SCExecutor"; + if (isBaaS) { + path = path.replace("ide/", "") + } return prefix + host + path; }