Skip to content

Commit a1d4888

Browse files
committedJun 2, 2022
Disable NextJS ETag generation.
1 parent d575b8e commit a1d4888

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎next.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,10 @@ module.exports = {
4242

4343
// https://nextjs.org/docs/api-reference/next.config.js/compression
4444
compress: false,
45+
46+
// ETags break stale content serving from the CDN. When a response has
47+
// an ETag, the CDN attempts to revalidate the content in the background.
48+
// This causes problems with serving stale content, since upon revalidating
49+
// the CDN marks the cached content as "fresh".
50+
generateEtags: false,
4551
}

0 commit comments

Comments
 (0)