Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/handler/cache-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,14 @@

const maxAge = cacheControlDirectives['max-age']
if (maxAge !== undefined) {
return maxAge > 0 ? maxAge * 1000 : undefined
return maxAge >= 0 ? maxAge * 1000 : undefined
}

const noCache = cacheControlDirectives['no-cache']
if (noCache !== undefined) {
return 0
}

Check failure on line 403 in lib/handler/cache-handler.js

View workflow job for this annotation

GitHub Actions / Lint

Trailing spaces not allowed
if (typeof resHeaders.expires === 'string') {
// https://www.rfc-editor.org/rfc/rfc9111.html#section-5.3
const expiresDate = parseHttpDate(resHeaders.expires)
Expand Down
Loading