Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

refactor(docs): migrate middleware.ts to proxy.ts for Next.js 16

Sushmithamalleshe82950797815
diff --git a/docs/middleware.ts b/docs/proxy.ts
similarity index 92%
rename from docs/middleware.ts
rename to docs/proxy.ts
index 956fb5ffa..4be335cdc 100644
--- a/docs/middleware.ts
+++ b/docs/proxy.ts
@@ -4,7 +4,7 @@ import { NextRequest, NextResponse } from 'next/server';
* Serves markdown when AI agents request it via Accept: text/markdown header.
* Test: curl -H "Accept: text/markdown" http://localhost:3000/docs/quickstart
*/
-export function middleware(request: NextRequest) {
+export function proxy(request: NextRequest) {
const accept = request.headers.get('accept') || '';
if (accept.includes('text/markdown') || accept.includes('text/plain')) {