Files
ipal-kit/src/modules/seo/siteNoindex.ts
T
Radosław SmolińskiandClaude Fable 5.2 0a4f001797 IAPL rename, scripted: preferred names in src, bin, scripts, services, tests; bin files and skill folders moved
Replaced by an explicit list of forms only (ten exported names, runtime env names, project file
names and marks, commands, skill names, the log prefix, the brand in prose). Package name, import
paths, routes, CSS tokens, data attributes, custom keys, context flags, the cookie and kv keys are
not touched. package.json keeps the five old bin names beside the five new ones.
The old names stop working in this commit and come back as aliases in the next; docs follow.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-25 17:24:21 +01:00

15 lines
628 B
TypeScript

/**
* 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'
}