/** * Whole-site noindex for staging, previews and test copies: set IAPL_NOINDEX=1 * in that environment's env. Then robots.txt disallows everything, every page * gets `robots: noindex, nofollow`, and buildSecurityHeaders adds * `X-Robots-Tag: noindex, nofollow` to every response (files and API too). * Production never sets it — a forgotten staging copy indexed by Google is a * duplicate of the real site. */ export const SITE_NOINDEX_ENV = 'IAPL_NOINDEX' export function isSiteNoindex(): boolean { const v = process.env[SITE_NOINDEX_ENV]?.trim().toLowerCase() return v === '1' || v === 'true' || v === 'yes' }