Fix proxied landing sitemap and rewrites#355
Conversation
PR SummaryMedium Risk Overview The rewrite proxy route no longer pre-builds pages from the merged sitemap via The sitemap metadata route now exports Reviewed by Cursor Bugbot for commit cb5ca46. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates Next.js App Router caching/prerender behavior so the generated sitemap and the proxied “rewrites” route reflect new landing/blog URLs via ISR without requiring a build-time allowlist.
Changes:
- Adds
export const revalidateto the sitemap metadata route to ensure it is revalidated on the same interval as its internal fetch caching. - Removes the sitemap-derived
generateStaticParams()allowlist from the proxied rewrite catch-all route. - Enables dynamic params on the proxied rewrite route so new paths can be generated on first request and cached via ISR.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/app/sitemap.ts | Exposes a route-level revalidate value so sitemap output is regenerated on the intended interval. |
| src/app/(rewrites)/[[...slug]]/route.ts | Removes build-time static params allowlist and enables dynamic params for ISR-backed first-hit generation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f247a94f69
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary
Verification