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
Copy file name to clipboardExpand all lines: docs/how-to/address-ipfs-on-web.md
+40-9Lines changed: 40 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -57,27 +57,58 @@ User agents that support IPFS, such as a browser with [ipfs-companion](https://d
57
57
58
58
## Path gateway
59
59
60
-
In the most basic scheme, a URL path used for content addressing is effectively a resource name without a canonical location. The HTTP server provides the location part, which makes it possible for browsers to interpret an IPFS content path as relative to the current server and just work without a need for any conversion:
60
+
In the most basic scheme, a URL path used for content addressing is effectively a resource name without a canonical location. The HTTP server provides the location part, which makes it possible for browsers to interpret an IPFS content path as relative to the current server and just work without a need for any conversion. Given a gateway host address (such as `ipfs.io`) and a path to the resource, (`/path/to/resource`), a [CID](../concepts/content-addressing.md) (`<cid>`), IPNS ID (`<ipnsid>`) or [DNSLink](../concepts/dnslink/) (`<dnslink>`) can all be used.
61
+
62
+
-[Using a CID](#using-a-cid)
63
+
-[Using IPNS](#using-ipns)
64
+
-[Using DNSLink](#using-dnslink)
65
+
66
+
### Using a CID
67
+
Given a CID `<cid>`, a URL path can be constructed as follows:
In this scheme, all pages share a [single origin](https://en.wikipedia.org/wiki/Same-origin_policy), which means this type of gateway should be used only when site isolation does not matter (static content without cookies, local storage, or Web APIs that require user permission).
69
-
70
-
When in doubt, use [subdomain gateway](#subdomain-gateway).
In this scheme, all pages share a [single origin](https://en.wikipedia.org/wiki/Same-origin_policy), which means this type of gateway should be used only when site isolation does not matter (static content without cookies, local storage, or Web APIs that require user permission).
108
+
109
+
When in doubt, use [subdomain gateway](#subdomain-gateway).
110
+
:::
111
+
81
112
## Subdomain gateway
82
113
83
114
When [origin-based security](https://en.wikipedia.org/wiki/Same-origin_policy) is needed, [CIDv1](../concepts/content-addressing.md#identifier-formats) in case-insensitive encoding such as Base32 or Base36 should be used in the subdomain:
0 commit comments