Next.js Discord

Discord Forum

Vercel is double encoding files

Unanswered
Northeast Congo Lion posted this in #help-forum
Open in Discord
Northeast Congo LionOP
Hi,
I have a brotli compressed file in my public folder and override the headers in the next.config.ts:

{
  key: "Content-Encoding",
  value: "br",
},


This works well in dev mode, but Vercel seems to encode this file again.
Content-Encoding: br, br is returned in the response headers.

This is usually not an issue, but it seems like that Safari can't handle double encoded files.

Can I prevent Vercel to compress my static files / CDN?

I have already added compress: false, in the next.config.ts.

0 Replies