kopia lustrzana https://github.com/c9/core
Allow specifying -a : to disable auth
rodzic
a66f2e44e1
commit
edbb59d8aa
|
@ -33,7 +33,6 @@ module.exports = function(config, optimist) {
|
|||
.describe("hosted", "Use default config of the hosted version")
|
||||
.default("hosted", false)
|
||||
.describe("auth", "Basic Auth username:password")
|
||||
.default("auth", ":")
|
||||
.describe("collab", "Whether to enable collab.")
|
||||
.default("collab", config.collab)
|
||||
.describe("cache", "use cached version of cdn files")
|
||||
|
@ -91,11 +90,11 @@ module.exports = function(config, optimist) {
|
|||
require("child_process").exec("tmux -L cloud91.9 kill-server", function(){});
|
||||
|
||||
var isLocalhost = host == "localhost" || host == "127.0.0.1";
|
||||
if (argv.auth == ":" && !isLocalhost) {
|
||||
if (argv.auth !== ":" && !isLocalhost) {
|
||||
console.log("Authentication is required when not running on localhost. Please use -a user:pass.");
|
||||
process.exit(255);
|
||||
}
|
||||
var auth = argv.auth.split(":");
|
||||
var auth = (argv.auth || ":").split(":");
|
||||
|
||||
var plugins = [
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue