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
This change adds support for DNSLink subdomains on localhost gateway
(ipfs/kubo#6096)
Example: en.wikipedia-on-ipfs.org.ipfs.localhost:8080
BREAKING CHANGE: `isIPFS.subdomain` now returns true for <domain.tld>.ipns.localhost
BREAKING CHANGE: `isIPFS.subdomainPattern` changed
License: MIT
Signed-off-by: Marcin Rataj <lidel@lidel.org>
Copy file name to clipboardexpand all lines: README.md
+12-5
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ $ npm install --save is-ipfs
23
23
The code published to npm that gets loaded on require is in fact an ES5 transpiled version with the right shims added. This means that you can require it and use with your favorite bundler without having to adjust asset management process.
Returns `true` if the provided string includes a valid IPFSor IPNS subdomain or `false` otherwise.
184
+
Returns `true` if the provided `url`string includes a valid IPFS, IPNS or DNSLink subdomain or `false` otherwise.
182
185
183
186
### `isIPFS.ipfsSubdomain(url)`
184
187
185
-
Returns `true` if the provided string includes a valid IPFS subdomain or `false` otherwise.
188
+
Returns `true` if the provided `url`string includes a valid IPFS subdomain (case-insensitive CIDv1) or `false` otherwise.
186
189
187
190
### `isIPFS.ipnsSubdomain(url)`
188
191
189
-
Returns `true` if the provided string includes a valid IPNS subdomain or `false` otherwise.
192
+
Returns `true` if the provided `url` string includes a valid IPNS subdomain (CIDv1 with `libp2p-key` multicodec) or `false` otherwise.
193
+
194
+
### `isIPFS.dnslinkSubdomain(url)`
195
+
196
+
Returns `true` if the provided `url` string includes a valid DNSLink subdomain (such as `http://en.wikipedia-on-ipfs.org.ipns.localhost:8080`) or `false` otherwise.
0 commit comments