Fixes handing of no keys set in config
This commit is contained in:
@@ -103,9 +103,9 @@ function handleParseHeaders(req, res, next) {
|
|||||||
|
|
||||||
// We do it with mismatching keys to support no-keys config
|
// We do it with mismatching keys to support no-keys config
|
||||||
var keyMismatch = keys.reduce(function(mismatch, key){
|
var keyMismatch = keys.reduce(function(mismatch, key){
|
||||||
// check the info key
|
|
||||||
// increment the mismatch if different
|
// check if set in the config and compare
|
||||||
if (info[key] !== req.config[key]) {
|
if (req.config[key] && info[key] !== req.config[key]) {
|
||||||
mismatch++;
|
mismatch++;
|
||||||
}
|
}
|
||||||
return mismatch;
|
return mismatch;
|
||||||
|
|||||||
Reference in New Issue
Block a user