Files
AI/참고/firecrawl-main/apps/test-site/src/pages/robots.txt.ts
2026-05-12 19:40:31 +09:00

14 lines
295 B
TypeScript

import type { APIRoute } from "astro";
const getRobotsTxt = (sitemapURL: URL) => `\
User-agent: *
Allow: /
Sitemap: ${sitemapURL.href}
`;
export const GET: APIRoute = ({ site }) => {
const sitemapURL = new URL("sitemap-index.xml", site);
return new Response(getRobotsTxt(sitemapURL));
};