@@ -55,7 +55,7 @@ import { MemoryKvStore } from "@fedify/fedify";
5555
5656const relay = createRelay (" mastodon" , {
5757 kv: new MemoryKvStore (),
58- domain : " relay.example.com" ,
58+ origin : " https:// relay.example.com" ,
5959 name: " My ActivityPub Relay" ,
6060 subscriptionHandler : async (ctx , actor ) => {
6161 // Approve all subscriptions
@@ -74,7 +74,7 @@ import { MemoryKvStore } from "@fedify/fedify";
7474
7575const relay = createRelay (" mastodon" , {
7676 kv: new MemoryKvStore (),
77- domain : " relay.example.com" ,
77+ origin : " https:// relay.example.com" ,
7878 name: " My ActivityPub Relay" ,
7979 subscriptionHandler : async (ctx , actor ) => {
8080 // Approve all subscriptions
@@ -97,7 +97,7 @@ import { serve } from "@hono/node-server";
9797
9898const relay = createRelay (" mastodon" , {
9999 kv: new MemoryKvStore (),
100- domain : " relay.example.com" ,
100+ origin : " https:// relay.example.com" ,
101101 name: " My ActivityPub Relay" ,
102102 subscriptionHandler : async (ctx , actor ) => {
103103 // Approve all subscriptions
@@ -130,8 +130,8 @@ Configuration options
130130: A [ ` KvStore ` ] ( ./kv.md ) for storing subscriber information and cryptographic
131131 keys.
132132
133- ` domain `
134- : The domain name where the relay is hosted. Defaults to ` "localhost" ` .
133+ ` origin ` (required)
134+ : The origin URL where the relay is hosted (e.g., ` "https://relay.example.com" ` ) .
135135
136136` name `
137137: Display name for the relay actor. Defaults to ` "ActivityPub Relay" ` .
@@ -146,7 +146,7 @@ Configuration options
146146 // ---cut-before---
147147 const relay = createRelay("mastodon", {
148148 kv: new MemoryKvStore(),
149- domain : "relay.example.com",
149+ origin : "https:// relay.example.com",
150150 queue: new InProcessMessageQueue(),
151151 subscriptionHandler: async (ctx, actor) => true,
152152 });
@@ -207,7 +207,7 @@ import { MemoryKvStore } from "@fedify/fedify";
207207// ---cut-before---
208208const relay = createRelay (" mastodon" , {
209209 kv: new MemoryKvStore (),
210- domain : " relay.example.com" ,
210+ origin : " https:// relay.example.com" ,
211211 subscriptionHandler : async (ctx , actor ) => true ,
212212});
213213~~~~
@@ -225,7 +225,7 @@ import { MemoryKvStore } from "@fedify/fedify";
225225// ---cut-before---
226226const relay = createRelay (" litepub" , {
227227 kv: new MemoryKvStore (),
228- domain : " relay.example.com" ,
228+ origin : " https:// relay.example.com" ,
229229 subscriptionHandler : async (ctx , actor ) => true ,
230230});
231231~~~~
@@ -243,8 +243,8 @@ The subscription URL differs between Mastodon-style and LitePub-style relays:
243243
244244| Relay type | Subscription URL | Example |
245245| --------------| ----------------------------------------| -----------------------------------|
246- | ` "mastodon" ` | Inbox URL: ` https://{domain }/inbox` | ` https://relay.example.com/inbox ` |
247- | ` "litepub" ` | Actor URL: ` https://{domain }/actor` | ` https://relay.example.com/actor ` |
246+ | ` "mastodon" ` | Inbox URL: ` {origin }/inbox` | ` https://relay.example.com/inbox ` |
247+ | ` "litepub" ` | Actor URL: ` {origin }/actor` | ` https://relay.example.com/actor ` |
248248
249249For more details on the protocol differences, see [ FEP-ae0c] .
250250
@@ -295,7 +295,7 @@ import { MemoryKvStore } from "@fedify/fedify";
295295// ---cut-before---
296296const relay = createRelay (" mastodon" , {
297297 kv: new MemoryKvStore (),
298- domain : " relay.example.com" ,
298+ origin : " https:// relay.example.com" ,
299299 subscriptionHandler : async (ctx , actor ) => true , // Accept all
300300});
301301~~~~
@@ -310,7 +310,7 @@ const blockedDomains = ["spam.example", "blocked.example"];
310310
311311const relay = createRelay (" mastodon" , {
312312 kv: new MemoryKvStore (),
313- domain : " relay.example.com" ,
313+ origin : " https:// relay.example.com" ,
314314 subscriptionHandler : async (ctx , actor ) => {
315315 const domain = new URL (actor .id ! ).hostname ;
316316 if (blockedDomains .includes (domain )) {
@@ -345,7 +345,7 @@ import { createRelay } from "@fedify/relay";
345345import { MemoryKvStore } from " @fedify/fedify" ;
346346const relay = createRelay (" mastodon" , {
347347 kv: new MemoryKvStore (),
348- domain : " relay.example.com" ,
348+ origin : " https:// relay.example.com" ,
349349 subscriptionHandler : async (ctx , actor ) => true ,
350350});
351351// ---cut-before---
@@ -365,7 +365,7 @@ import { createRelay } from "@fedify/relay";
365365import { MemoryKvStore } from " @fedify/fedify" ;
366366const relay = createRelay (" mastodon" , {
367367 kv: new MemoryKvStore (),
368- domain : " relay.example.com" ,
368+ origin : " https:// relay.example.com" ,
369369 subscriptionHandler : async (ctx , actor ) => true ,
370370});
371371// ---cut-before---
0 commit comments