We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2a4d01 commit d20384bCopy full SHA for d20384b
index.js
@@ -37,7 +37,7 @@ const middleware = (opts) => async (req, res, next) => {
37
let { status, headers, data } = JSON.parse(cached)
38
39
// pre-checking If-None-Match header
40
- if (req.headers[CACHE_IF_NONE_MATCH] === headers[CACHE_ETAG]) {
+ if (req.headers[CACHE_IF_NONE_MATCH] && req.headers[CACHE_IF_NONE_MATCH] === headers[CACHE_ETAG]) {
41
res.setHeader('content-length', '0')
42
res.statusCode = 304
43
res.end()
0 commit comments