Force user to authenticate

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

Wyświetl plik

@ -85,8 +85,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 = [