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:
parent
97905039ed
commit
29e8654b01
2 changed files with 8 additions and 0 deletions
|
|
@ -4,6 +4,7 @@
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Tubearr</title>
|
<title>Tubearr</title>
|
||||||
|
<meta name="robots" content="noindex, nofollow" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,13 @@ export async function healthRoutes(fastify: FastifyInstance): Promise<void> {
|
||||||
return { status: 'ok' };
|
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
|
// Authenticated component health
|
||||||
fastify.get('/api/v1/health', async (_request, _reply) => {
|
fastify.get('/api/v1/health', async (_request, _reply) => {
|
||||||
const components: ComponentHealth[] = [];
|
const components: ComponentHealth[] = [];
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue