-
Notifications
You must be signed in to change notification settings - Fork 18
Remove ai-agents middleware rewrite #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@mishushakov the way you suggested makes it slightly annoying to configure. remember when using js native regexp, for every literal |
…figurability + improve: readability
refactored to glob pattern matching for easier configurability |
/** | ||
* Configuration for SEO-related settings. | ||
*/ | ||
|
||
/** | ||
* An array of glob patterns for deprecated routes that will return a 410 (Gone) status. | ||
* | ||
* Pattern syntax examples: | ||
* - '/ai-agents' - Exact match for /ai-agents | ||
* - '/ai-agents/*' - Matches a single segment (e.g., /ai-agents/foo) | ||
* - '/ai-agents/**' - Matches multiple segments (e.g., /ai-agents/foo/bar) | ||
* - '/ai-agents/{foo,bar}' - Matches /ai-agents/foo or /ai-agents/bar | ||
* - '/ai-agents/!(foo|bar)' - Matches anything except /ai-agents/foo or /ai-agents/bar | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments, I think the code is self-explanatory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not. if i just want to configure new paths and don't know anything about the repo this is helpful
const normalizedPath = | ||
pathname.endsWith('/') && pathname !== '/' | ||
? pathname.slice(0, -1) // Remove trailing slash except for root path | ||
: pathname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you actually need to normalize it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nits, but otherwise good to go
This pr removes references to our framer landing page by removing
LANDING_PAGE_FRAMER_DOMAIN
from global/rewrite config and sitemap generation.Additionally:
seo
config for marking path globs as deprecated routes to inform seo crawlers about deprecation to get them removed from indexing faster by returning410
(no content) status codes instead of404
in catch-all route handler/ai-agents/**
paths to return410