Skip to content

Commit

Permalink
fix(cache): do not process HEAD requests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanebachelier committed May 17, 2016
1 parent acdf131 commit 1d41e98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ function cache (config = {}) {
// We should exclude HEAD
const method = req.method.toLowerCase()

if (method !== 'get' && method !== 'head') {
if (method === 'head') {
return null
}

if (method !== 'get') {
config.store.removeItem(uuid)
return null
}
Expand Down

0 comments on commit 1d41e98

Please sign in to comment.