Skip to content

Use max-age header to set ttl #3

@eschwartz

Description

@eschwartz

It looks like CrispHttpCache is only looking at the the s-maxage header to set TTLs:

main.js:234
if (cacheControlInfo['s-maxage'] && !isPrivate) {
  return callback(null, parseInt(cacheControlInfo['s-maxage']) * 1000);
}

I would think that should be:

const maxAge = cacheControlInfo['s-maxage'] || cacheControlInfo['max-age'];
if (maxAge && !isPrivate) {
  return callback(null, parseInt(cacheControlInfo['s-maxage']) * 1000);
}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions