Next.js Discord

Discord Forum

next/link hard-navigating when behind cloudfront

Unanswered
Sinhala Hound posted this in #help-forum
Open in Discord
Sinhala HoundOP
I'm running next.js in AWS in a kubernetes cluster, with cloudfront to cache the output. This has been working for a while, but at the moment, I'm having an issue where for some reason all next/link Links are hard-navigating between routes (in the same app router route group). There are pages in both app router and pages router, and we do use layout groups. But this is between routes inside the same layout group. More importantly, the same service works just fine when I port-forward to it, and access it that way - it's only a problem through cloudfront.

So the question is why? Does nextjs do some kind of header inspection or something to determine whether to do a hard-navigation or a soft-navigation? What is the mechanism for the decisino here?

1 Reply

Sinhala HoundOP
bump