diff --git a/node_modules/c9/urls.js b/node_modules/c9/urls.js index 04ca1edb..7484194b 100644 --- a/node_modules/c9/urls.js +++ b/node_modules/c9/urls.js @@ -34,7 +34,8 @@ plugin.getBaseUrl = function(req, sourceBaseUrlPattern, targetBaseUrlPattern) { || req.host || req.url && req.url.replace(/^https?:\/\/([^/]*).*/, "$1") || req; - assert(!sourceHost.match(/\$DOMAIN/), "Please provide a valid request object"); + if (typeof sourceHost !== "string") + throw new Error("Not a valid request object: " + req); var sourceHostMatcher = sourceBaseUrlPattern .replace(/^https?:\/\//, "") diff --git a/server.js b/server.js index 6cb21bb1..2711230c 100755 --- a/server.js +++ b/server.js @@ -63,7 +63,7 @@ function main(argv, config, onLoaded) { .describe("dump", "dump config file as JSON") .describe("domains", "Primary and any secondary top-level domains to use (e.g, c9.io,c9.dev)") .describe("exclude", "Exclude specified service") - .default("domains", inContainer && process.env.C9_HOSTNAME) + .default("domains", inContainer && process.env.C9_HOSTNAME || process.env.C9_DOMAINS) .boolean("help") .describe("help", "Show command line options.");