Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 | 1x 1x 1x 1x 1x 1x 1x 1x 1x | export default defineEventHandler(async event => {
const db = database(event)
await ready(db)
const canonical = await db.prepare("SELECT value FROM site_content WHERE `key`='seoCanonicalUrl'").first<{
value: string
}>()
const origin = String(canonical?.value || useRuntimeConfig(event).public.siteUrl || getRequestURL(event).origin).replace(/\/$/, '')
setHeader(event, 'content-type', 'text/plain; charset=utf-8')
return `User-agent: *\nAllow: /\nDisallow: /admin\nDisallow: /api/\nDisallow: /compte\nDisallow: /commande\nDisallow: /panier\nSitemap: ${origin}/sitemap.xml\n`
})
|