mirror of
https://github.com/vacp2p/specs.git
synced 2026-01-08 23:08:09 -05:00
Reword Namespace section a bit
This commit is contained in:
@@ -85,7 +85,11 @@ component spec](https://github.com/libp2p/specs/pull/550) for more details.
|
||||
|
||||
## Namespace
|
||||
|
||||
libp2p does not squat the global namespace. libp2p application protocols can be discovered by the [well-known resource](https://www.rfc-editor.org/rfc/rfc8615) `.well-known/libp2p`. This allows server operators to dynamically change the URLs of the application protocols offered, and not hard-code any assumptions how a certain resource is meant to be interpreted.
|
||||
libp2p does not squat the global namespace. libp2p application protocols can be
|
||||
discovered by the [well-known resource](https://www.rfc-editor.org/rfc/rfc8615)
|
||||
`.well-known/libp2p`. This allows server operators to dynamically change the
|
||||
URLs of the application protocols offered, and not hard-code any assumptions how
|
||||
a certain resource is meant to be interpreted.
|
||||
|
||||
```json
|
||||
|
||||
@@ -97,9 +101,11 @@ libp2p does not squat the global namespace. libp2p application protocols can be
|
||||
}
|
||||
```
|
||||
|
||||
The resource contains a mapping of application protocols to their respective URL. For example, this configuration file would tell a client
|
||||
The resource contains a mapping of application protocols to a URL namespace. For
|
||||
example, this configuration file would tell a client
|
||||
|
||||
1. That the Kademlia protocol is available at `/kademlia` and
|
||||
1. That the Kademlia application protocol is available with prefix `/kademlia`
|
||||
and,
|
||||
2. The [IPFS Trustless Gateway API](https://specs.ipfs.tech/http-gateways/trustless-gateway/) is mounted at `/`.
|
||||
|
||||
It is valid to expose a service at `/`. It is RECOMMENDED that implementations facilitate the coexistence of different service endpoints by ensuring that more specific URLs are resolved before less specific ones. For example, when registering handlers, more specific paths like `/kademlia/foo` should take precedence over less specific handler, such as `/`.
|
||||
|
||||
Reference in New Issue
Block a user