mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Test check backward backward compatibility authentication method basic
on calendar module Fix travis basic-auth server
This commit is contained in:
@@ -5,10 +5,9 @@ var express = require("express")
|
||||
|
||||
var basic = auth.basic({
|
||||
realm: "MagicMirror Area restricted."
|
||||
}, (username, password, callback) => {
|
||||
callback(username === "MagicMirror" && password === "CallMeADog");
|
||||
}
|
||||
);
|
||||
}, (username, password, callback) => {
|
||||
callback(username === "MagicMirror" && password === "CallMeADog");
|
||||
});
|
||||
|
||||
this.server = express();
|
||||
this.server.use(auth.connect(basic));
|
||||
@@ -16,16 +15,16 @@ this.server.use(auth.connect(basic));
|
||||
// Set directories availables
|
||||
var directories = ["/tests/configs"];
|
||||
var directory;
|
||||
root_path = path.resolve(__dirname + "/../../");
|
||||
rootPath = path.resolve(__dirname + "/../../");
|
||||
for (i in directories) {
|
||||
directory = directories[i];
|
||||
this.server.use(directory, express.static(path.resolve(root_path + directory)));
|
||||
this.server.use(directory, express.static(path.resolve(rootPath + directory)));
|
||||
}
|
||||
|
||||
exports.listen = function () {
|
||||
this.server.listen.apply(this.server, arguments);
|
||||
this.server.listen.apply(this.server, arguments);
|
||||
};
|
||||
|
||||
exports.close = function (callback) {
|
||||
this.server.close(callback);
|
||||
this.server.close(callback);
|
||||
};
|
||||
|
Reference in New Issue
Block a user