Initial commit

This commit is contained in:
mxdyeah committed 2026-07-08 01:15:18 +08:00
commit acadc92e68
780 files changed
+468285

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
import { getRequestURL } from "h3";
export default defineEventHandler((event) => {
const requestUrl = getRequestURL(event);
const siteUrl = requestUrl.origin;
const robots = [
"User-agent: *",
"Allow: /",
"Disallow: /api/admin/",
"Disallow: /api/auth/",
`Sitemap: ${siteUrl}/sitemap.xml`,
].join("\n");
setHeader(event, "Content-Type", "text/plain; charset=utf-8");
return robots;
});