From c5b30545bf9240ddeb5faad50ae626a09e6893f1 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Tue, 12 May 2020 13:00:25 +0200 Subject: [PATCH] docs: X-Forwarded-Proto: https Additional documentation for running subdomain gateway behind reverse proxy with TLS. --- docs/config.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/config.md b/docs/config.md index 8663d276f..7aa218874 100644 --- a/docs/config.md +++ b/docs/config.md @@ -614,8 +614,10 @@ Below is a list of the most common public gateway setups. } }' ``` - **Note:** this enables automatic redirects from content paths to subdomains - `http://dweb.link/ipfs/{cid}` → `http://{cid}.ipfs.dweb.link` + **Note I:** this enables automatic redirects from content paths to subdomains: + `http://dweb.link/ipfs/{cid}` → `http://{cid}.ipfs.dweb.link` + **Note II:** if you run go-ipfs behind reverse proxy that provides TLS make it add `X-Forwarded-Proto: https` HTTP header to ensure users are redirected to `https://` URLs (Nginx directive: `proxy_set_header X-Forwarded-Proto "https";`): + `https://dweb.link/ipfs/{cid}` → `https://{cid}.ipfs.dweb.link` * Public [path gateway](https://docs-beta.ipfs.io/how-to/address-ipfs-on-web/#path-gateway) at `http://ipfs.io/ipfs/{cid}` (no Origin separation) ```console