Skip to content

Commit

Permalink
Ensure etags are not generated for static files when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Sep 14, 2023
1 parent 9482b59 commit 811364b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/next/src/server/lib/router-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,8 @@ export async function initialize(opts: {
try {
return await serveStatic(req, res, matchedOutput.itemPath, {
root: matchedOutput.itemsRoot,
// Ensures that etags are not generated for static files when disabled.
etag: config.generateEtags,
})
} catch (err: any) {
/**
Expand Down

0 comments on commit 811364b

Please sign in to comment.