mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 17:44:52 -04:00
Fix for issue #950
Changed 'server.js' to allow an empty ipwhitelist to allow any and all hosts instead of none as mentioned in the documentation
This commit is contained in:
parent
86ae704e86
commit
a7297d2685
7 changed files with 35 additions and 32 deletions
|
@ -30,7 +30,7 @@ var Server = function(config, callback) {
|
|||
}
|
||||
|
||||
app.use(function(req, res, next) {
|
||||
var result = ipfilter(config.ipWhitelist, {mode: "allow", log: false})(req, res, function(err) {
|
||||
var result = ipfilter(config.ipWhitelist, {mode: config.ipWhitelist.length === 0 ? "deny" : "allow", log: false})(req, res, function(err) {
|
||||
if (err === undefined) {
|
||||
return next();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue