A development host is kept out of search engines without IAPL_NOINDEX (developmentNoindex, default on)

Separate from the mail rule so that it can be taken or left. A site whose address matches
iapl({ developmentHosts }) - built in: *.dev.netscale.pl - is noindex with no env: robots.txt disallows
everything, pages carry noindex, IndexNow sends nothing, buildSecurityHeaders() adds X-Robots-Tag. Nothing
kept a development copy out of search engines until now unless somebody set the variable.

- iapl({ developmentNoindex: false }) switches it off for the project, IAPL_NOINDEX=0 for one environment
- buildSecurityHeaders({ developmentHosts, serverUrl }): next.config runs before the plugin
- the mail rule keeps its own two signals: the development pattern, and the variable itself
- changelog "what changes on upgrade", deployment.md, security.md, AGENT.md, skills

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Radosław Smoliński
2026-11-26 10:31:03 +01:00
co-authored by Claude Fable 5.2
parent 14abf369da
commit bc3aac249f
23 changed files with 215 additions and 24 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ export default withPayload(withSecurityConfig(nextConfig))
| `csp` | `false` | `buildCsp` args → the CSP header (+ `Reporting-Endpoints` with `reportUri`) |
| `additional` | `[]` | extra headers; the same key overrides (also the `csp` ones) |
With `IAPL_NOINDEX=1` (staging), `X-Robots-Tag: noindex, nofollow` is added to every response.
With `IAPL_NOINDEX=1` (staging), or on a development host — the site's address (`serverUrl`, default `NEXT_PUBLIC_SERVER_URL`) matches `developmentHosts` (default `['*.dev.netscale.pl']`, Intecion's development domain) — `X-Robots-Tag: noindex, nofollow` is added to every response. `next.config` runs before the plugin, so a project that changed `iapl({ developmentHosts })` passes the same list: `buildSecurityHeaders({ developmentHosts: [...] })`; `developmentHosts: false` or `IAPL_NOINDEX=0` leaves the header out.
**Uploads:** `buildUploadSecurityHeaders({ collections = ['media'] })` returns `headers()` rules for
`/api/<collection>/file/*` (sandbox, no scripts) — an SVG from local disk cannot run a script on the site's