Release notes

FEATURE

GitHub API Traffic Supports Custom Gateways, While Authentication and URLs Remain Direct

Organizations that need to audit or centrally manage network traffic can now route GitHub API requests to a custom gateway via the per-host api_host setting. This change only forwards API calls; login authentication, Git remote repository operations, and browser-opened URLs still connect directly to the original host. This feature is currently experimental and is not a security boundary, so some requests may still reach the original host.

# Set up forwarding API traffic for github.com to a custom gateway
gh config set api_host gh-gateway.example.com --host github.com

# Query the currently configured API gateway address for a specific host
gh config get api_host --host github.com

Original changelog

Original changelogGitHub API Traffic Supports Custom Gateways, While Authentication and URLs Remain Direct
## Experimental: Route GitHub API traffic through a custom host

Organizations can now route a GitHub host's API traffic through a gateway using the new per-host `api_host` configuration:

```shell
# Route API traffic for github.com through a gateway
gh config set api_host gh-gateway.example.com --host github.com

# Read the configured API host
gh config get api_host --host github.com
```

The original host remains in use for authentication, Git remotes, and browser URLs.

> [!NOTE]
> `api_host` is experimental and is not a security boundary. Requests may still reach the original host.