32 lines
811 B
JavaScript
32 lines
811 B
JavaScript
import { c as defineEventHandler, u as useRuntimeConfig, h as setHeader } from '../_/nitro.mjs';
|
|
import { a as absUrl } from '../_/api.mjs';
|
|
import 'unhead/server';
|
|
import 'vue';
|
|
import 'unhead/legacy';
|
|
import 'unhead/plugins';
|
|
import 'node:http';
|
|
import 'node:https';
|
|
import 'node:events';
|
|
import 'node:buffer';
|
|
import 'node:fs';
|
|
import 'node:path';
|
|
import 'node:crypto';
|
|
import 'node:url';
|
|
|
|
const robots_txt = defineEventHandler((event) => {
|
|
const { siteUrl } = useRuntimeConfig().public;
|
|
setHeader(event, "Content-Type", "text/plain; charset=utf-8");
|
|
return [
|
|
"User-Agent: *",
|
|
"Allow: /",
|
|
"Disallow: /_internal/",
|
|
"",
|
|
`Host: ${siteUrl}`,
|
|
`Sitemap: ${absUrl("/sitemap.xml")}`,
|
|
""
|
|
].join("\n");
|
|
});
|
|
|
|
export { robots_txt as default };
|
|
//# sourceMappingURL=robots.txt.mjs.map
|