mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge pull request +10714 from c9/fix-issue-10369
fixes +10369 silence the warnings
This commit is contained in:
commit
e806edd448
10
node_modules/c9/urls.js
generated
vendored
10
node_modules/c9/urls.js
generated
vendored
@ -73,6 +73,9 @@ function getBaseUrl(req, sourceBaseUrlPattern, targetBaseUrlPattern) {
|
||||
|
||||
if (!sourceBaseUrlPattern)
|
||||
throw new Error("getBaseUrl() requires at least two arguments");
|
||||
|
||||
if (!targetBaseUrlPattern)
|
||||
targetBaseUrlPattern = sourceBaseUrlPattern;
|
||||
|
||||
var sourceHostMatcher = sourceBaseUrlPattern
|
||||
.replace(/^https?:\/\//, "")
|
||||
@ -91,15 +94,10 @@ function getBaseUrl(req, sourceBaseUrlPattern, targetBaseUrlPattern) {
|
||||
targetHost = "c9.io";
|
||||
}
|
||||
|
||||
if (/^(ide|vfs)./.test(targetHost) && !targetBaseUrlPattern)
|
||||
console.error(new Error("Warning: no targetBaseUrlPattern specified, will stay at " + targetHost), {
|
||||
sourceBaseUrlPattern: sourceBaseUrlPattern
|
||||
});
|
||||
|
||||
if (/^(ide|vfs)./.test(targetHost))
|
||||
console.trace("Warning: possibly incorrect baseUrl constructed, with 'ide.' in the hostname: " + targetHost);
|
||||
|
||||
return replaceDomain(targetBaseUrlPattern || sourceBaseUrlPattern, targetHost)
|
||||
return replaceDomain(targetBaseUrlPattern, targetHost)
|
||||
.replace(/\/$/, "");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user