Comparing version 1.0.1 to 2.0.0
16
index.js
@@ -1,12 +0,2 @@ | ||
var deprecate = require('depd')('nocache') | ||
module.exports = function nocache (options) { | ||
options = options || {} | ||
if (options.hasOwnProperty('noEtag')) { | ||
deprecate('noEtag will be removed in the next version of nocache. Please remove this option.') | ||
} | ||
var noEtag = options.noEtag | ||
module.exports = function nocache () { | ||
return function nocache (req, res, next) { | ||
@@ -17,7 +7,5 @@ res.setHeader('Surrogate-Control', 'no-store') | ||
res.setHeader('Expires', '0') | ||
if (noEtag) { | ||
res.removeHeader('ETag') | ||
} | ||
next() | ||
} | ||
} |
@@ -8,3 +8,3 @@ { | ||
"description": "Middleware to destroy caching", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"license": "MIT", | ||
@@ -32,4 +32,4 @@ "keywords": [ | ||
"mocha": "^2.3.4", | ||
"standard": "^5.4.1", | ||
"supertest": "^1.1.0" | ||
"standard": "^7.1.2", | ||
"supertest": "^2.0.0" | ||
}, | ||
@@ -41,6 +41,3 @@ "standard": { | ||
] | ||
}, | ||
"dependencies": { | ||
"depd": "1.1.0" | ||
} | ||
} |
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
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
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
0
3281
9
1
- Removeddepd@1.1.0
- Removeddepd@1.1.0(transitive)