mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
Merge pull request +10161 from c9/improve-urls
[Trivial] .test is more robust them match
This commit is contained in:
commit
93e50f59e2
4
node_modules/c9/urls.js
generated
vendored
4
node_modules/c9/urls.js
generated
vendored
@ -91,12 +91,12 @@ function getBaseUrl(req, sourceBaseUrlPattern, targetBaseUrlPattern) {
|
||||
targetHost = "c9.io";
|
||||
}
|
||||
|
||||
if (targetHost.match(/^(ide|vfs)./) && !targetBaseUrlPattern)
|
||||
if (/^(ide|vfs)./.test(targetHost) && !targetBaseUrlPattern)
|
||||
console.error(new Error("Warning: no targetBaseUrlPattern specified, will stay at " + targetHost), {
|
||||
sourceBaseUrlPattern: sourceBaseUrlPattern
|
||||
});
|
||||
|
||||
if (targetHost.match(/^(ide|vfs)./))
|
||||
if (/^(ide|vfs)./.test(targetHost))
|
||||
console.trace("Warning: possibly incorrect baseUrl constructed, with 'ide.' in the hostname: " + targetHost);
|
||||
|
||||
return replaceDomain(targetBaseUrlPattern || sourceBaseUrlPattern, targetHost)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user