Skip to content

Commit

Permalink
Requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
linkRace committed Aug 7, 2017
1 parent 6c48a8e commit a923714
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ var crypto = require('crypto');
* @param {Object} options The configuration object.
*/
var lusca = module.exports = function (options) {
var headers = [], nonce;
var headers = [];
var nonce;

if (options) {
Object.keys(lusca).forEach(function (key) {
Expand All @@ -33,8 +34,6 @@ var lusca = module.exports = function (options) {
nonce = true;
}

//if (key === 'csp' && lusca[key](config) && lusca[key](config)[styleNonce])

if (config) {
headers.push(lusca[key](config));
}
Expand All @@ -57,8 +56,7 @@ var lusca = module.exports = function (options) {
next(err);
return;
}
header(req, res, next);
return;
return header(req, res, next);
};
}(chain));
});
Expand Down

0 comments on commit a923714

Please sign in to comment.