Skip to content

Commit 0ba155e

Browse files
committed
docs(path-gateway): clarify X-Ipfs-Path and X-Ipfs-Roots usage
specify that X-Ipfs-Path and X-Ipfs-Roots headers should be returned with deserialized responses, and may be omitted with trustless response types (raw blocks and CAR)
1 parent d5533c1 commit 0ba155e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/http-gateways/path-gateway.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,10 @@ Indicates the original, requested content path before any path resolution and tr
646646

647647
Example: `X-Ipfs-Path: /ipns/k2..ul6/subdir/file.txt`
648648

649+
This header SHOULD be returned with deserialized responses.
650+
Implementations MAY omit it with trustless response types
651+
(`application/vnd.ipld.raw` and `application/vnd.ipld.car`).
652+
649653
### `X-Ipfs-Roots` (response header)
650654

651655
Used for HTTP caching.
@@ -675,6 +679,10 @@ NOTE: while the first CID will change every time any article is changed,
675679
the last root (responsible for specific article or a subdirectory) may not
676680
change at all, allowing for smarter caching beyond what standard Etag offers.
677681

682+
This header SHOULD be returned with deserialized responses.
683+
Implementations MAY omit it with trustless response types
684+
(`application/vnd.ipld.raw` and `application/vnd.ipld.car`).
685+
678686
NOTE: Gateways that stream responses (e.g., CAR) without pre-resolving the
679687
entire path MAY only include the root CID for simple `/ipfs/{cid}` requests, or
680688
MAY omit this header for path requests where intermediate CIDs are not known

0 commit comments

Comments
 (0)