Skip to content

Commit 9b955f2

Browse files
Fix: Cache Control (#102)
* Update cache control headers with s-maxage and revalidation * Remove s-maxage from headers
1 parent 87505dc commit 9b955f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/cache-control.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const setCacheControl = (
1212
const headers = response.headers as Headers;
1313

1414
if (headers) {
15-
headers.set('Cache-Control', `public, max-age=${maxAge}`);
16-
headers.set('CDN-Cache-Control', `public, max-age=${cdnMaxAge}`);
15+
headers.set('Cache-Control', `public, max-age=${maxAge}, must-revalidate`);
16+
headers.set('CDN-Cache-Control', `public, max-age=${cdnMaxAge}, must-revalidate`);
1717
}
1818
};

0 commit comments

Comments
 (0)