Merge pull request #7651 from ipfs/docs/x-forwarded-host

docs(config): X-Forwarded-Host
This commit is contained in:
Adin Schmahmann 2020-10-02 12:27:24 -04:00 committed by GitHub
commit 00a08985b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -702,11 +702,11 @@ Below is a list of the most common public gateway setups.
}
}'
```
**Note I:** this enables automatic redirects from content paths to subdomains:
**Backward-compatible:** this feature 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 a reverse proxy that provides TLS, make it add a `X-Forwarded-Proto: https` HTTP header to ensure users are redirected to `https://`, not `http://`. The NGINX directive is `proxy_set_header X-Forwarded-Proto "https";`.:
**X-Forwarded-Proto:** if you run go-ipfs behind a reverse proxy that provides TLS, make it add a `X-Forwarded-Proto: https` HTTP header to ensure users are redirected to `https://`, not `http://`. The NGINX directive is `proxy_set_header X-Forwarded-Proto "https";`.:
`http://dweb.link/ipfs/{cid}``https://{cid}.ipfs.dweb.link`
**Note III:** we also support `X-Forwarded-Proto: example.com` if you want to override subdomain gateway host from the original request:
**X-Forwarded-Host:** we also support `X-Forwarded-Host: example.com` if you want to override subdomain gateway host from the original request:
`http://dweb.link/ipfs/{cid}``http://{cid}.ipfs.example.com`