Skip to content

Commit

Permalink
docs: *_GATEWAY_DOMAINS env vars (#73)
Browse files Browse the repository at this point in the history
* docs: RAINBOW_SUBDOMAIN_GATEWAY_DOMAINS env var
* docs: add RAINBOW_GATEWAY_DOMAINS

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
  • Loading branch information
2color and lidel authored Feb 7, 2024
1 parent 866c181 commit 958f131
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ rainbow
libp2p.key
blockstore
datastore
flatfs

# Binaries for programs and plugins
*.exe
Expand Down
21 changes: 18 additions & 3 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
`rainbow` ships with some implicit defaults that can be adjusted via env variables below.

- [Configuration](#configuration)
- [`RAINBOW_GATEWAY_DOMAINS`](#rainbow_gateway_domains)
- [`RAINBOW_SUBDOMAIN_GATEWAY_DOMAINS`](#rainbow_subdomain_gateway_domains)
- [`KUBO_RPC_URL`](#kubo_rpc_url)
- [Logging](#logging)
- [`GOLOG_LOG_LEVEL`](#golog_log_level)
Expand All @@ -15,15 +17,29 @@

## Configuration

### `RAINBOW_GATEWAY_DOMAINS`

Comma-separated list of path gateway hostnames. For example, passing `ipfs.io` will enable handler for standard [path gateway](https://specs.ipfs.tech/http-gateways/path-gateway/) requests with the `Host` header set to `ipfs.io`.

Default: `127.0.0.1`


### `RAINBOW_SUBDOMAIN_GATEWAY_DOMAINS`

Comma-separated list of [subdomain gateway](https://specs.ipfs.tech/http-gateways/subdomain-gateway/) domains. For example, passing `dweb.link` will enable handler for standard [subdomain gateway](https://specs.ipfs.tech/http-gateways/subdomain-gateway/) requests with the `Host` header set to `*.ipfs.dweb.link` and `*.ipns.dweb.link`.

Default: `localhost`

### `KUBO_RPC_URL`

Default: see `DefaultKuboRPC`
Default: `127.0.0.1:5001` (see `DefaultKuboRPC`)

Single URL or a comma separated list of RPC endpoints that provide `/api/v0` from Kubo.
Single URL or a comma separated list of RPC endpoints that provide legacy `/api/v0` from Kubo.

We use this to redirect some legacy `/api/v0` commands that need to be handled on `ipfs.io`.

This is deprecated and will be removed in the future.

## Logging

### `GOLOG_LOG_LEVEL`
Expand Down Expand Up @@ -79,7 +95,6 @@ tracing is disabled.

Warning: Enabling tracing will likely affect performance.


## Testing

### `GATEWAY_CONFORMANCE_TEST`
Expand Down

0 comments on commit 958f131

Please sign in to comment.