docs: X-Forwarded-Proto: https

Additional documentation for running subdomain gateway behind reverse proxy with TLS.
This commit is contained in:
Marcin Rataj 2020-05-12 13:00:25 +02:00 committed by GitHub
parent fa8c88b123
commit c5b30545bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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