From 2411dffa2ce997370a636ed56cc73bcc4661ec7f Mon Sep 17 00:00:00 2001 From: Sheogorath Date: Wed, 7 Mar 2018 15:17:35 +0100 Subject: Change config to camel case with backwards compatibility This refactors the configs a bit to now use camel case everywhere. This change should help to clean up the config interface and make it better understandable. Signed-off-by: Sheogorath --- lib/csp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/csp.js') diff --git a/lib/csp.js b/lib/csp.js index b46ae8ef..cef2e2f6 100644 --- a/lib/csp.js +++ b/lib/csp.js @@ -25,7 +25,7 @@ CspStrategy.computeDirectives = function () { var directives = {} mergeDirectives(directives, config.csp.directives) mergeDirectivesIf(config.csp.addDefaults, directives, defaultDirectives) - mergeDirectivesIf(config.usecdn, directives, cdnDirectives) + mergeDirectivesIf(config.useCDN, directives, cdnDirectives) if (!areAllInlineScriptsAllowed(directives)) { addInlineScriptExceptions(directives) } @@ -66,7 +66,7 @@ function getCspNonce (req, res) { } function addUpgradeUnsafeRequestsOptionTo (directives) { - if (config.csp.upgradeInsecureRequests === 'auto' && config.usessl) { + if (config.csp.upgradeInsecureRequests === 'auto' && config.useSSL) { directives.upgradeInsecureRequests = true } else if (config.csp.upgradeInsecureRequests === true) { directives.upgradeInsecureRequests = true -- cgit v1.2.3