From 9244cf07b98c59fd5b0a6270d941af7c474a5553 Mon Sep 17 00:00:00 2001 From: Konstantin Wohlwend Date: Mon, 11 Aug 2025 14:20:18 -0700 Subject: [PATCH] docs robots.txt --- docs/src/app/robots.txt/route.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docs/src/app/robots.txt/route.ts 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 + }, + }); +}