Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Repro: next start compression never applies to Route Handlers / metadata routes

With default config (compress not disabled), next start gzips page renders but sends every Route Handler response uncompressed — including metadata routes like app/sitemap.js. Real-world sitemaps are routinely hundreds of KB of XML, all sent as identity to crawlers.

Steps

npm install
npm run build
npm run start

Then:

curl -s -H 'Accept-Encoding: gzip, br' -D - -o /dev/null http://127.0.0.1:3000/
curl -s -H 'Accept-Encoding: gzip, br' -D - -o /dev/null http://127.0.0.1:3000/sitemap.xml
curl -s -H 'Accept-Encoding: gzip, br' -D - -o /dev/null http://127.0.0.1:3000/d.xml

Result

Route Kind Content-Encoding
/ page gzip ✅
/sitemap.xml metadata route (prerendered ○) (none) ❌
/d.xml route handler (force-dynamic ƒ) (none) ❌

Both bodies are far above the bundled compression middleware's 1KB threshold, and application/xml is compressible: true in mime-db (same result with text/plain).

Reproduced on next 16.2.10, 16.3.3 (latest) and 16.4.0-canary.9.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages