Creating one
Project settings → Environments → Add environment.
Only a workspace owner or admin can add an environment or change its address,
because a saved procedure’s password may be typed on any of the project’s
environments.
The default environment
When a project has a default environment, every run that names no environment uses it: chat runs, procedure replays, schedules and API triggers. Its address replaces the project’s own, and its headers are sent. There is no “no environment” choice while a default is set. To run against the project’s own address without it, unset the default. A run that overrides the base address (a PR preview, a--base-url, a
schedule’s own address) does not get the default environment, so its headers
never reach a host they were not saved for.
Using one
The CLI does not pick an environment. It uses the default, or a
--base-url for a one-off address:
Headers
Headers are the right place for an API token, a preview-deployment bypass header, or a feature flag.- Sent to the environment’s own address only: the same scheme, host and port. Other sites the page loads (analytics, CDNs, an API on a sibling host) never receive them. If that address redirects a request elsewhere, the headers go with the redirect.
- Not sent on WebSocket connections or on requests a service worker answers.
- Stored encrypted and never shown again. The app and the API show each
header’s name with
***for its value. When you edit an environment, leave a value empty to keep the saved one. - Removed from each run’s trace before it is saved. A page that displays a header value will still show it in the recording and screenshots.
Cookies
An environment can also carry cookies, up to 50. Add them when you create the environment, or with Cookies on an existing one, which replaces or removes the saved set. They are encrypted at rest and applied to the browser before the run starts, and each one is set for the environment’s own address.A typical setup
production
The project’s own address. Scheduled nightly. Alerts to Slack.
staging
Staging address plus a bypass header. Run on demand.
preview
Address built per pull request by the GitHub integration from its
preview pattern.

