helmet-csp
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -26,2 +26,4 @@ var camelize = require('camelize') | ||
browser = platform.parse(userAgent) | ||
} else { | ||
browser = {} | ||
} | ||
@@ -28,0 +30,0 @@ |
@@ -8,3 +8,3 @@ { | ||
"description": "Content Security Policy middleware.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
@@ -11,0 +11,0 @@ "keywords": [ |
@@ -95,2 +95,16 @@ var csp = require('..') | ||
it('sets all the headers if there is no user-agent', function (done) { | ||
var app = use({ | ||
directives: { | ||
defaultSrc: ["'self'", 'domain.com'] | ||
} | ||
}) | ||
request(app).get('/').unset('User-Agent') | ||
.expect('X-Content-Security-Policy', "default-src 'self' domain.com") | ||
.expect('Content-Security-Policy', "default-src 'self' domain.com") | ||
.expect('X-WebKit-CSP', "default-src 'self' domain.com") | ||
.end(done) | ||
}) | ||
it('can set the report-only headers', function (done) { | ||
@@ -97,0 +111,0 @@ var app = use({ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
26445
592
0