import type { APIRoute } from "astro"; export const GET: APIRoute = ({ site }) => { const origin = site?.origin ?? import.meta.env.PUBLIC_SITE_URL ?? "https://rf4spotter.ru"; const body = [ "User-agent: *", "Allow: /", "Disallow: /admin/", "Disallow: /api/", "Disallow: /health", "Disallow: /ready", `Sitemap: ${origin}/sitemap.xml`, "", ].join("\n"); return new Response(body, { headers: { "Content-Type": "text/plain; charset=utf-8", "Cache-Control": "public, max-age=3600" } }); };