Skip to content

Commit b6c4027

Browse files
author
Kevin Whitley
committed
added ability to blacklist headers through PR
1 parent 03c2a67 commit b6c4027

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -238,14 +238,11 @@ Special thanks to all those that use this library and report issues, but especia
238238
- [@danielsogl](https://github.com/danielsogl) - Keeping dev deps up to date
239239
- [@peteboere](https://github.com/peteboere) - Node v7 headers update
240240
- [@vectart](https://github.com/vectart) - Added middleware local options support
241+
- [@andredigenova](https://github.com/andredigenova) - Added header blacklist as options
241242

242-
### Bugfixes
243+
### Bugfixes, Documentation, etc.
243244

244-
- @Amhri, @Webcascade, @conmarap, @cjfurelid, @scambier, @lukechilds, @Red-Lv
245-
246-
### Documentation
247-
248-
- @gesposito, @viebel
245+
- @Amhri, @Webcascade, @conmarap, @cjfurelid, @scambier, @lukechilds, @Red-Lv, @gesposito, @viebel
249246

250247
### Changelog
251248
- **v0.4.0** - dropped lodash and memory-cache external dependencies, and bumped node version requirements to 4.0.0+ to allow Object.assign native support
@@ -265,4 +262,4 @@ Special thanks to all those that use this library and report issues, but especia
265262
middleware.localOptions support (thanks @vectart). Added ability to overwrite/embed headers
266263
(e.g. "cache-control": "no-cache") through options.
267264
- **v0.9.1** - added eslint in prep for v1.x branch, minor ES6 to ES5 in master branch tests
268-
265+
- **v0.10.0** - added ability to blacklist headers (prevents caching) via options.headersBlacklist (thanks @andredigenova)

src/apicache.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ function ApiCache() {
233233
try {
234234
redis.del(key)
235235
} catch(err) {
236-
throw Error('[apicache] error in redis.del("' + key + '"")')
236+
console.log('[apicache] error in redis.del("' + key + '")')
237237
}
238238
}
239239
index.all = index.all.filter(doesntMatch(key))
@@ -250,7 +250,7 @@ function ApiCache() {
250250
try {
251251
redis.del(target)
252252
} catch(err) {
253-
throw Error('[apicache] error in redis.del("' + target + '"")')
253+
console.log('[apicache] error in redis.del("' + target + '")')
254254
}
255255
}
256256

@@ -277,7 +277,7 @@ function ApiCache() {
277277
try {
278278
redis.del(key)
279279
} catch(err) {
280-
throw Error('[apicache] error in redis.del("' + key + '"")')
280+
console.log('[apicache] error in redis.del("' + key + '")')
281281
}
282282
})
283283
}

0 commit comments

Comments
 (0)