Skip to content

Commit 0bab131

Browse files
fix: Dynamic robots.txt (#11166)
* dynamic robots.txt * Update app/robots.txt/route.ts --------- Co-authored-by: Stephanie Anderson <[email protected]>
1 parent 9fe91a3 commit 0bab131

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

app/robots.txt/route.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import {isDeveloperDocs} from 'sentry-docs/isDeveloperDocs';
2+
3+
export const GET = (_request: Request) => {
4+
return new Response(
5+
`
6+
Sitemap: ${isDeveloperDocs ? 'https://develop.sentry.dev/sitemap.xml' : 'https://docs.sentry.io/sitemap.xml'}
7+
User-agent: *
8+
`.trim(),
9+
{headers: {'content-type': 'text/plain'}}
10+
);
11+
};

public/robots.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)