feat: 初始化慧遇书院官网一期
This commit is contained in:
6
server/routes/robots.txt.get.ts
Normal file
6
server/routes/robots.txt.get.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export default defineEventHandler((event) => {
|
||||
const baseUrl = String(useRuntimeConfig().public.siteUrl).replace(/\/$/, '')
|
||||
setHeader(event, 'Content-Type', 'text/plain; charset=utf-8')
|
||||
setHeader(event, 'Cache-Control', 'public, max-age=3600')
|
||||
return `User-agent: *\nAllow: /\nDisallow: /admin\nDisallow: /api/admin\nDisallow: /api/auth\n\nSitemap: ${baseUrl}/sitemap.xml\n`
|
||||
})
|
||||
Reference in New Issue
Block a user