mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 15:13:07 +00:00
20 lines
508 B
TypeScript
20 lines
508 B
TypeScript
import type { MetadataRoute } from 'next'
|
|
|
|
import { isStagingSite } from '@/lib/siteEnvironment'
|
|
|
|
/**
|
|
* Staging is a throwaway validation target — it must never be indexed
|
|
* (OPS103). Production keeps the allow-all behavior it had implicitly (there
|
|
* was no robots.txt before OPS103).
|
|
*/
|
|
export default function robots(): MetadataRoute.Robots {
|
|
if (isStagingSite()) {
|
|
return {
|
|
rules: { userAgent: '*', disallow: '/' },
|
|
}
|
|
}
|
|
|
|
return {
|
|
rules: { userAgent: '*', allow: '/' },
|
|
}
|
|
}
|