Repository navigation
fix: rename /latest/feed.xml route to /latest/feed to break redirect loop - #18308
Conversation
…loop Netlify's @netlify/plugin-nextjs adds a trailing slash to extension-bearing paths, while Next.js framework-level trailing-slash logic strips it back off after the next-intl middleware rewrites the path with a default locale. The two redirects ping-pong forever (ERR_TOO_MANY_REDIRECTS) on /latest/feed.xml and every locale/trailing-slash variant. Rename the route directory so the URL no longer has a file extension, which makes Netlify and Next.js agree on the canonical /latest/feed/ form. Drop the manual trailing-slash stripping on feedUrl and the alternates metadata since getFullUrl now produces the right shape directly, and remove the proxy.ts opt-in matcher that only existed to coax middleware into running for the extension path. Adds a permanent /latest/feed.xml -> /latest/feed/ redirect for any external links to the old URL. Fixes ethereum#18299
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
This issue is stale because it has been open 30 days with no activity. |
|
Thanks for this fix — we've confirmed the redirect loop is still live on production today ( |
🔎 First-pass review — 🔧 Needs workThis fixes the Blocking:
AnalysisLane: code ( Checked: the feed URL now built as Routing:
|
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
wackerow
left a comment
There was a problem hiding this comment.
Lgtm!
https://deploy-preview-18308.ethereum.it/latest/feed.xml properly redirects to /latest/feed/ and loads the xml.
Pulling in, thanks @tenderdeve!

Summary
Fixes #18299 —
/latest/feed.xmlreturned an infinite redirect loop on production.Root cause: Next.js trailing-slash setting + Netlify edge handling of the
.xmlextension caused/latest/feed.xml↔/latest/feed.xml/to ping-pong. The previous.replace(/\/$/, "")hacks onfeedUrland the proxy matcher were workarounds, not a fix.Approach: Drop the file extension from the route segment so Next.js trailing-slash handling applies cleanly.
Changes (4 files, +4/-15)
app/[locale]/latest/feed.xml/→app/[locale]/latest/feed/.replace(/\/$/, "")hack fromapp/[locale]/latest/feed/route.tsalternates.types["application/rss+xml"]inapp/[locale]/latest/page.tsx/:locale?/latest/feed.xmlmatcher fromproxy.ts/latest/feed.xml→/latest/feed/inredirects.config.jsfor back-compat with existing subscribersTest plan
curl -IL https://ethereum.org/latest/feed.xml— expect single 308 then 200 (no loop)curl -I https://ethereum.org/latest/feed/— expect 200 withapplication/rss+xml/latest/feed.xmlstill resolve via redirect