You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, this type of gateway requires additional reverse proxy configuration.
70
-
As a reference, Nginx config for subdomain gateway at <code>dweb.link</code> is:
70
+
go-ipfs provides native support for subdomain gateways on hostnames defined in [`Gateway.PublicGateways`](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#gatewaypublicgateways) configuration map.
71
71
72
-
```nginx
73
-
if ($http_host ~ ^(.+)\.(ipfs|ipns)\.dweb\.link$) {
74
-
set $ipfspath /$2/$1;
75
-
rewrite "^(.*)$" $ipfspath$1 last;
76
-
}
72
+
Learn more about daemon configuration for hosting a public gateway:
73
+
74
+
-[`Gateway.PublicGateways` docs](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#gatewaypublicgateways) for defining gateway behavior on specified hostnames
75
+
-[`Gateway` recipes](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#gatewaypublicgateways) with ready to use one-liners for most common use cases
76
+
77
+
:::
78
+
79
+
::: danger
80
+
81
+
Some browsers and other user agents force lowercase for the authority part of URLs, breaking case-sensitive CIDs before HTTP Gateway has a chance to read them.
82
+
83
+
To avoid this, use of case-insensitive CIDv1 in Base32 in subdomain context is suggested as the safe default.
84
+
85
+
:::
86
+
87
+
::: tip
88
+
89
+
To convert CID to Base32 use [cid.ipfs.io](https://cid.ipfs.io) or a command line:
There is ongoing work to <ahref="https://github.com/ipfs/go-ipfs/issues/6498"target="_blank">add native subdomain support to the IPFS daemon <iclass="fas fa-external-link-square-alt fa-sm"></i></a> which will simplify setup and remove the need for path translation at reverse proxy.
Support for case-insensitive IPNS roots is a <ahref="https://github.com/ipfs/go-ipfs/issues/5287"target="_blank">work in progress <iclass="fas fa-external-link-square-alt fa-sm"></i></a>.
139
+
140
+
Native URI require CID to be case-insensitive. Use of CIDv1 in Base32 is advised.
0 commit comments