Skip to content

Commit 9244cf0

Browse files
committed
docs robots.txt
1 parent e6e30d0 commit 9244cf0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/src/app/robots.txt/route.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { deindent } from "@stackframe/stack-shared/dist/utils/strings";
2+
import { NextRequest } from "next/server";
3+
4+
export async function GET({}: NextRequest) {
5+
const robotsContent = deindent`
6+
User-agent: *
7+
Allow: /
8+
`;
9+
10+
return new Response(robotsContent, {
11+
headers: {
12+
"Content-Type": "text/plain",
13+
"Cache-Control": "public, max-age=3600", // Cache for 1 hour
14+
},
15+
});
16+
}

0 commit comments

Comments
 (0)