2024-10-14 10:47:49 -05:00
|
|
|
import type { APIContext } from 'astro';
|
|
|
|
|
|
2025-04-03 12:23:53 -05:00
|
|
|
export async function GET({ request }: APIContext) {
|
|
|
|
|
const flags: Record<string, string | null> = {
|
|
|
|
|
'User-agent': '*',
|
2025-04-06 22:04:01 -05:00
|
|
|
Allow: '/',
|
2025-04-03 12:23:53 -05:00
|
|
|
|
|
|
|
|
space: null,
|
|
|
|
|
Sitemap: `${new URL(request.url).origin}/sitemap-index.xml`,
|
|
|
|
|
};
|
2024-10-14 10:47:49 -05:00
|
|
|
|
2024-11-17 12:29:57 -06:00
|
|
|
return new Response(
|
2025-04-03 12:23:53 -05:00
|
|
|
Object.entries(flags)
|
|
|
|
|
.map(([key, value]) => (value === null ? '' : `${key}: ${value}`))
|
|
|
|
|
.join('\n'),
|
2024-11-17 12:29:57 -06:00
|
|
|
);
|
2024-10-14 10:47:49 -05:00
|
|
|
}
|