From 4f6deedced0bc3b1e82770cf4334669e91850bc1 Mon Sep 17 00:00:00 2001 From: Daniel Norman <1992255+2color@users.noreply.github.com> Date: Wed, 7 Feb 2024 14:27:13 +0100 Subject: [PATCH 1/2] docs: RAINBOW_SUBDOMAIN_GATEWAY_DOMAINS env var --- docs/environment-variables.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/environment-variables.md b/docs/environment-variables.md index 19865ab..f07a415 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -79,6 +79,9 @@ tracing is disabled. Warning: Enabling tracing will likely affect performance. +### `RAINBOW_SUBDOMAIN_GATEWAY_DOMAINS` + +Comma-separated list of subdomain gateway domains. For example, passing `dweb.link` will serve 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`. ## Testing From 1f1b0ac8c08db3b1b585dc7e61f1fa44fedcc8d5 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Wed, 7 Feb 2024 16:46:18 +0100 Subject: [PATCH 2/2] docs: add RAINBOW_GATEWAY_DOMAINS --- .gitignore | 1 + docs/environment-variables.md | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 8f61a23..759a422 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ rainbow libp2p.key blockstore datastore +flatfs # Binaries for programs and plugins *.exe diff --git a/docs/environment-variables.md b/docs/environment-variables.md index f07a415..6e2d9d7 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -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) @@ -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` @@ -79,10 +95,6 @@ tracing is disabled. Warning: Enabling tracing will likely affect performance. -### `RAINBOW_SUBDOMAIN_GATEWAY_DOMAINS` - -Comma-separated list of subdomain gateway domains. For example, passing `dweb.link` will serve 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`. - ## Testing ### `GATEWAY_CONFORMANCE_TEST`