Environments
A site has one or more environments, each with its own hosts. There is production, which is live, and there can be others, such as staging. site.environment gives name, is_production, indexable, password, code_version and engine.
A password per environment
site.environment.password is null, or {"username": "preview", "hash": "<bcrypt>"}. An empty hash means that the environment is closed for everyone. So fail closed.
- First redirect to https and the main host. Then ask for the password.
- Every request to such a host gets
401withWWW-Authenticate: Basic realm="Preview"andX-Robots-Tag: noindex. That includes files,robots.txtand the sitemap. - Do not let a static cache bypass this.
GET /_health
Every host answers this, without a token or password:
{"site": "ABC123", "environment": "production", "version": "<manifest version of the snapshot>", "engine": "1.4.0"}Lightbolt compares version with the published manifest. The answer holds no other data, no timings and no paths.
Good to know
- Environments that are not production are never indexed.
- A form that is sent on an environment that is not live is kept as a test. It is sent nowhere. The answer says
"test": true.
Also called: staging, preview environment, production, basic auth, health endpoint.
Last changed