How do you avoid cache poisoning with next + cloudflare
Unanswered
Orinoco Crocodile posted this in #help-forum
Orinoco CrocodileOP
I wanted to know how do you avoid cache poisonning with next+cloudflare ?
since CF ignores the Vary header and caches only by URL, so it serves the same cached response (either HTML or RSC payload) for both initial page loads and client-side navigations, even though Next.js sends different headers to distinguish them
and this issue si still here as of the latests next stable releases
https://github.com/vercel/next.js/discussions/48527
https://github.com/vercel/next.js/issues/65335
since CF ignores the Vary header and caches only by URL, so it serves the same cached response (either HTML or RSC payload) for both initial page loads and client-side navigations, even though Next.js sends different headers to distinguish them
and this issue si still here as of the latests next stable releases
https://github.com/vercel/next.js/discussions/48527
https://github.com/vercel/next.js/issues/65335