
| Current Path : /var/www/html/konvbav/vendor/twbs/bootstrap/site/src/pages/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/konvbav/vendor/twbs/bootstrap/site/src/pages/robots.txt.ts |
import type { APIRoute } from 'astro'
export const GET: APIRoute = function GET({ site }) {
const isProduction = import.meta.env.PROD
const isNetlify = import.meta.env.NETLIFY === 'true'
const allowCrawling = !isNetlify && isProduction
const robotsTxt = `# www.robotstxt.org${allowCrawling ? '\n# Allow crawling of all content' : ''}
User-agent: *
Disallow: ${allowCrawling ? '' : '/'}
Sitemap: ${new URL('sitemap-index.xml', site)}
`
return new Response(robotsTxt, {
headers: {
'Content-Type': 'text/plain'
}
})
}