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 specification describes how HTTP Gateway semantics
29
-
and APIs can be used over [libp2p](https://github.com/libp2p/specs) transports.
26
+
and APIs can be used over [libp2p](https://github.com/libp2p/specs) transports,
27
+
and how libp2p can coexist with other HTTP services on the same host.
30
28
31
-
## Specification
29
+
#libp2p HTTP Protocols Manifest
32
30
33
-
The [libp2p+HTTP specification](https://github.com/libp2p/specs/pull/508)
34
-
describes how to use HTTP semantics over stream transports, as well as how
31
+
The [libp2p+HTTP specification](https://github.com/libp2p/specs/blob/master/http/README.md)
32
+
describes how to use libp2p with HTTP semantics over stream transports, as well as how
35
33
to do discovery of what protocols are available (and where they are mounted).
36
34
37
-
###`.well-known/libp2p/protocols`
35
+
## `.well-known/libp2p/protocols`
38
36
39
-
libp2p application sub-protocols exposed behind `/http/1.1` protocol can be
37
+
Any libp2p application sub-protocols exposed behind `/http/1.1` protocol can be
40
38
discovered by the well-known resource (:cite[rfc8615]) at `.well-known/libp2p/protocols`.
41
39
42
-
####Protocol identifier
40
+
### Protocol Identifier
43
41
44
-
In order for a given HTTP Gateway protocol like the :cite[trustless-gateway] to
45
-
work in this environment it requires a protocol identifier to act as a key in
42
+
In order for a pure HTTP Gateway protocol like the :cite[trustless-gateway] to
43
+
coexist with libp2p in this environment it requires a protocol identifier to act as a key in
46
44
the `.well-known/libp2p/protocols` mapping file.
47
45
48
46
The `/http/1.1` sub-protocol identifier for the IPFS Gateway when used over libp2p is:
@@ -51,7 +49,7 @@ The `/http/1.1` sub-protocol identifier for the IPFS Gateway when used over libp
51
49
/ipfs/gateway
52
50
```
53
51
54
-
####Protocol mounting
52
+
### Protocol Mounting
55
53
56
54
A reference `.well-known/libp2p/protocols` JSON body with mapping that assumes the gateway to be mounted at `/`:
57
55
@@ -63,20 +61,20 @@ A reference `.well-known/libp2p/protocols` JSON body with mapping that assumes t
63
61
}
64
62
```
65
63
66
-
## Gateway type detection
64
+
#Peer ID Authentication
67
65
68
-
The protocol identifier is shared among Gateway specifications.
66
+
[Peer ID Authentication over HTTP](https://github.com/libp2p/specs/blob/master/http/peer-id-auth.md)is optional and SHOULD NOT be required by [Trustless Gateway](https://specs.ipfs.tech/http-gateways/trustless-gateway/) HTTP endpoint defined for `/ipfs/gateway` handler.
69
67
70
-
HTTP server mounted behind the `/ipfs/gateway` identifier MUST expose
71
-
:cite[trustless-gateway], but is free to also support other gateway types and
72
-
features.
68
+
Clients following the Trustless Gateway specification MUST verify each CID individually, without being concerned with peer identity.
69
+
PeerID authentication is not required for trustless retrieval and HTTP-only clients SHOULD work without it.
73
70
74
-
:::note
71
+
# Gateway Type Detection
75
72
76
-
Signaling Features on HTTP Gateways is wip in [IPIP-425](https://github.com/ipfs/specs/pull/425).
73
+
The `/ipfs/gateway` protocol identifier is shared among all Gateway specifications.
77
74
78
-
Until the IPIP is finalized, client implementations SHOULD perform feature
79
-
detection on their own, or assume only the most basic [block (application/vnd.ipld.raw)](https://specs.ipfs.tech/http-gateways/trustless-gateway/#block-responses-application-vnd-ipld-raw)
80
-
response type from :cite[trustless-gateway] is available.
75
+
An HTTP server mounted behind the `/ipfs/gateway` identifier MUST expose the most basic [block (application/vnd.ipld.raw)](https://specs.ipfs.tech/http-gateways/trustless-gateway/#block-responses-application-vnd-ipld-raw)
76
+
responses from :cite[trustless-gateway], but MAY also support other gateway types and features.
81
77
82
-
:::
78
+
Client implementations SHOULD [perform feature detection](https://specs.ipfs.tech/http-gateways/trustless-gateway/#dedicated-probe-paths) on their own,
79
+
or assume only the most basic [block (application/vnd.ipld.raw)](https://specs.ipfs.tech/http-gateways/trustless-gateway/#block-responses-application-vnd-ipld-raw)
80
+
response type from :cite[trustless-gateway] is available.
0 commit comments