feat: Added GET /robots.txt route returning disallow-all and meta robot…

- "src/server/routes/health.ts"
- "src/frontend/index.html"

GSD-Task: S02/T02
This commit is contained in:
jlightner 2026-04-04 09:35:46 +00:00
parent 97905039ed
commit 29e8654b01
2 changed files with 8 additions and 0 deletions

View file

@ -4,6 +4,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Tubearr</title>
<meta name="robots" content="noindex, nofollow" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
</head>
<body>

View file

@ -17,6 +17,13 @@ export async function healthRoutes(fastify: FastifyInstance): Promise<void> {
return { status: 'ok' };
});
// robots.txt — disallow all crawlers (private media manager)
fastify.get('/robots.txt', async (_request, reply) => {
return reply
.type('text/plain')
.send('User-agent: *\nDisallow: /\n');
});
// Authenticated component health
fastify.get('/api/v1/health', async (_request, _reply) => {
const components: ComponentHealth[] = [];