Force user to authenticate

pull/39/head
Ruben Daniels 2015-02-17 17:46:36 +00:00
rodzic 04917cfa7c
commit a3b0c70a5d
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -91,8 +91,10 @@ 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)
argv.auth = "admin:admin";
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 plugins = [