Next.js Discord

Discord Forum

Cloudflare cache breaks NextJS routing

Unanswered
Chalcid wasp posted this in #help-forum
Open in Discord
Avatar
Chalcid waspOP
I use Cloudflare in front of my NextJS App and if I set in Cloudflare to "cache all" (Cache Rule), the routes are cached but the navigation breaks (it uses the classic navigation by navigating to a new page with reload). I also have excluded _rsc files, from cache because if I don't I get JSON as HTML output (https://github.com/vercel/next.js/discussions/59167). Any idea? Do you use Cloudflare as a CDN in front of NextJS Apps?

0 Replies