From a923714be0b0d5403b1e88c6ce5bd90ce90d2b23 Mon Sep 17 00:00:00 2001 From: linkRace Date: Mon, 7 Aug 2017 14:25:22 -0700 Subject: [PATCH] Requested changes --- index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index 90d4fed..b769731 100644 --- a/index.js +++ b/index.js @@ -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) { @@ -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)); } @@ -57,8 +56,7 @@ var lusca = module.exports = function (options) { next(err); return; } - header(req, res, next); - return; + return header(req, res, next); }; }(chain)); });