/** SEO 端点:输出 robots.txt(默认允许抓取 + 指向 sitemap)。 */ import type { APIRoute } from "astro"; import { buildDefaultRobotsInput, buildRobotsTxt } from "@app/seo-geo"; import { siteSeo } from "~/lib/seo"; export const prerender = false; export const GET: APIRoute = () => { const body = buildRobotsTxt(buildDefaultRobotsInput(siteSeo)); return new Response(body, { headers: { "Content-Type": "text/plain; charset=utf-8", "Cache-Control": "public, max-age=3600", }, }); };