We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e6e30d0 commit 9244cf0Copy full SHA for 9244cf0
docs/src/app/robots.txt/route.ts
@@ -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