Next.js 16 doesn't allow both middleware.ts and proxy.ts.
Set x-pathname header in the existing proxy.ts instead.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove redundant hasKebab detection loop. Since kebabToCamel() returns
input unchanged when there's no kebab pattern, the pathname comparison
already catches whether any conversion occurred.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Next.js doesn't allow both middleware.ts and proxy.ts.
Added kebab-case → camelCase redirect logic to existing proxy.ts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Next.js 16 deprecated the "middleware" file convention in favor of "proxy".
Renamed file and function accordingly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Renamed proxy.ts → middleware.ts (Next.js requires this name)
- Renamed function proxy → middleware (Next.js requires this name)
- Simplified matcher to work for all pages (excludes api, _next, llms, static files)
- Middleware now properly executes for content negotiation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Following Lee Robinson's Agent-Ready principles:
- Add .md URL extension support (in addition to .mdx)
- Add proxy.ts for Accept: text/markdown header support
- Same URL serves HTML to browsers, Markdown to AI agents
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>