Socket
Socket
Sign inDemoInstall

nocache

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nocache - npm Package Compare versions

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()
}
}

9

package.json

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc