File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -520,10 +520,16 @@ This header is more widely used in [SUBDOMAIN_GATEWAY.md](./SUBDOMAIN_GATEWAY.md
520
520
Gateway MUST return a redirect when a valid UnixFS directory was requested
521
521
without the trailing ` / ` , for example:
522
522
523
- - response for ` https://ipfs.io /ipns/en.wikipedia-on-ipfs.org/wiki `
524
- (no trailing slash) will be HTTP 301 redirect with
523
+ - response for UnixFS directory at ` https://example.com /ipns/en.wikipedia-on-ipfs.org/wiki `
524
+ (no trailing slash) MUST be HTTP 301 redirect with
525
525
` Location: /ipns/en.wikipedia-on-ipfs.org/wiki/ `
526
526
527
+ This normalization is required for directory-based relative links
528
+ and security scopes such as Service Worker registrations to work correctly.
529
+ It also ensures the same behavior on path gateways (` https://example.com/ipfs/cid/ ` with trailing ` / ` )
530
+ and origin-isolated HTTP contexts ` https://cid.ipfs.dweb.link `
531
+ or non-HTTP URLs like ` ipfs://cid ` , where empty path component is implicit ` / ` .
532
+
527
533
### ` X-Ipfs-Path ` (response header)
528
534
529
535
Used for HTTP caching and indicating the IPFS address of the data.
You can’t perform that action at this time.
0 commit comments