import type { APIRoute } from "astro"; export const GET: APIRoute = ({ site }) => { const origin = (site ?? new URL("https://example.com")).toString().replace(/\/$/, ""); return new Response( `User-agent: * Allow: / Disallow: /admin Sitemap: ${origin}/sitemap.xml `, { headers: { "Content-Type": "text/plain; charset=utf-8" } }, ); };