Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
docs(eng-5200): clarify domain precedence and https guidance
Tre Dubravaaf69be9b9d58
diff --git a/docs/cli/project-config.mdx b/docs/cli/project-config.mdxindex dda5a168ab..67ec4eef0b 100644--- a/docs/cli/project-config.mdx+++ b/docs/cli/project-config.mdx@@ -58,11 +58,11 @@ If you connect to EU Cloud or a self-hosted instance, you can pin the instance UThe CLI resolves the domain in the following order, from highest to lowest precedence:1. The `--domain` flag-2. The `INFISICAL_DOMAIN` environment variable (the legacy `INFISICAL_API_URL` is still honored)+2. The `INFISICAL_DOMAIN` environment variable (the legacy `INFISICAL_API_URL` is still honored; when both are set, `INFISICAL_DOMAIN` wins)3. The `domain` field in `.infisical.json`4. The default (US Cloud, `https://app.infisical.com`)-The value must start with `http://` or `https://`, otherwise it is ignored.+The value must start with `http://` or `https://`, otherwise it is ignored. Always prefer `https://`. An `http://` domain sends your secrets and credentials over the network in plaintext, so only use it for isolated, private-network setups.<Warning>Because `.infisical.json` is usually committed to your repository, the CLI prints a warning naming the host whenever the domain is read from the file, since all requests and credentials are sent there. Only set `domain` to an instance you trust, and review it when cloning a project you do not control.diff --git a/docs/cli/usage.mdx b/docs/cli/usage.mdxindex cca3a634ac..e0447da668 100644--- a/docs/cli/usage.mdx+++ b/docs/cli/usage.mdx@@ -142,7 +142,7 @@ The CLI defaults to US Cloud (https://app.infisical.com). To connect to **EU Clo- Use the `--domain` flag on every command- Set the `domain` field in your project's [`.infisical.json`](/cli/project-config)-When more than one is set, the CLI uses this order of precedence: `--domain` flag, then `INFISICAL_DOMAIN`, then the `domain` field in `.infisical.json`, then the default. The legacy `INFISICAL_API_URL` environment variable is still honored.+When more than one is set, the CLI uses this order of precedence: `--domain` flag, then `INFISICAL_DOMAIN`, then the `domain` field in `.infisical.json`, then the default. The legacy `INFISICAL_API_URL` environment variable is still honored, but `INFISICAL_DOMAIN` takes precedence when both are set.<Tabs><Tab title='Use Environment Variable (Recommended)'>