pub(crate) fn is_gov_mode(internal: &InternalClient) -> boolExpand description
Returns true when the client is in Gov Mode.
Today, this is inferred from the configured API URL host. Uses URL parsing rather than substring matching so that paths, queries, and adversarial subdomain spoofs (e.g. api.bitwarden-gov.com.evil.example) cannot accidentally classify as Gov. Host matching is case-insensitive and allows any subdomain under bitwarden-gov.com.
PM-36520 will refactor this to read from stored /config state, adding support for self-hosted Gov installs where URL inference cannot work because self-hosted URLs are customer-chosen.