upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2024-04-25 11:56:08 -0300
committerfiatjaf <fiatjaf@gmail.com>2024-04-25 11:56:08 -0300
commit981ca17aea65194b8bee419fc818ae1a54f68340 (patch)
tree2ca8c84f0db55ad9ec63280d9deb6bf3b9499dce
parent6071f3489eabe50eea748a2585a73c02a23d96cf (diff)
nip11: "virtual_paths"canonical-virtual
-rw-r--r--11.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/11.md b/11.md
index a50038a..07d489a 100644
--- a/11.md
+++ b/11.md
@@ -60,6 +60,30 @@ The relay MAY choose to publish its software version as a string attribute. The
60Extra Fields 60Extra Fields
61------------ 61------------
62 62
63### Virtual Relays
64
65Some relays want to expose "virtual" addresses to the same underlying dataset or other types of weird functionality. A basic example is a relay that may serve all notes under its `/` path, but only Italian notes under its `/it` path and only Japanese notes under its `/jp` path. In this case clients may use the virtual (`/jp` etc) paths when browsing the relay, for example; but in other situations, like when selecting relays for building a feed for some specific profile, clients should just want to connect to `/`.
66
67```json
68{
69 "virtual_path": {
70 "is": true,
71 "canonical": "/",
72 "alternatives": [
73 {"path": "/jp", "description": "only stuff in Japanese"},
74 {"path": "/it", "description": "only stuff in Italian"},
75 {"path": "/fr", "description": "whatever"},
76 {"path": "/pt", "description": "blergh"}
77 ]
78 },
79 ...
80}
81```
82
83- `is`: this is `true` when the current path queried is a virtual path.
84- `canonical`: this is the path that should be used when the client doesn't care about the virtual.
85- `alternatives`: optionally, if a relay wants to announce its virtual paths, this may be useful sometimes.
86
63### Server Limitations 87### Server Limitations
64 88
65These are limitations imposed by the relay on clients. Your client 89These are limitations imposed by the relay on clients. Your client