Browse Source

Only set If-Modified-Since header if we definitely have Last-Modified

pull/15/head
Luke Childs 8 years ago
parent
commit
c00d6a823e
  1. 2
      src/index.js

2
src/index.js

@ -77,7 +77,7 @@ class Onionoo {
return cachedResult
// If it's stale, add last-modified date to headers
} else {
} else if (cachedResult.headers['last-modified']) {
options.headers = {
'if-modified-since': cachedResult.headers['last-modified']
}

Loading…
Cancel
Save