diff --git a/docs/src/app/robots.txt/route.ts b/docs/src/app/robots.txt/route.ts new file mode 100644 index 000000000..f64f7d537 --- /dev/null +++ b/docs/src/app/robots.txt/route.ts @@ -0,0 +1,16 @@ +import { deindent } from "@stackframe/stack-shared/dist/utils/strings"; +import { NextRequest } from "next/server"; + +export async function GET({}: NextRequest) { + const robotsContent = deindent` + User-agent: * + Allow: / + `; + + return new Response(robotsContent, { + headers: { + "Content-Type": "text/plain", + "Cache-Control": "public, max-age=3600", // Cache for 1 hour + }, + }); +}