Options for createFederation function.
kvPrefixes: Partial<FederationKvPrefixes>
Prefixes for namespacing keys in the Deno KV store. By default, all keys
are prefixed with ["_fedify"]
.
queue: MessageQueue
The message queue for sending activities to recipients' inboxes. If not provided, activities will not be queued and will be sent immediately.
manuallyStartQueue: boolean
Whether to start the task queue manually or automatically.
If true
, the task queue will not start automatically and you need to
manually start it by calling the Federation.startQueue method.
If false
, the task queue will start automatically as soon as
the first task is enqueued.
By default, the queue starts automatically.
documentLoader: DocumentLoader
A custom JSON-LD document loader. By default, this uses the built-in cache-backed loader that fetches remote documents over HTTP(S).
contextLoader: DocumentLoader
A custom JSON-LD context loader. By default, this uses the same loader as the document loader.
authenticatedDocumentLoaderFactory: AuthenticatedDocumentLoaderFactory
A factory function that creates an authenticated document loader for a given identity. This is used for fetching documents that require authentication.
allowPrivateAddress: boolean
Whether to allow fetching private network addresses in the document loader.
If turned on, CreateFederationOptions.documentLoader, CreateFederationOptions.contextLoader, and CreateFederationOptions.authenticatedDocumentLoaderFactory cannot be configured.
Mostly useful for testing purposes. Do not use in production.
Turned off by default.
onOutboxError: OutboxErrorHandler
A callback that handles errors during outbox processing. Note that this callback can be called multiple times for the same activity, because the delivery is retried according to the backoff schedule until it succeeds or reaches the maximum retry count.
If any errors are thrown in this callback, they are ignored.
signatureTimeWindow:
The time window for verifying HTTP Signatures of incoming requests. If the
request is older or newer than this window, it is rejected. Or if it is
false
, the request's timestamp is not checked at all.
By default, the window is an hour.
skipSignatureVerification: boolean
Whether to skip HTTP Signatures verification for incoming activities. This is useful for testing purposes, but should not be used in production.
By default, this is false
(i.e., signatures are verified).
outboxRetryPolicy: RetryPolicy
The retry policy for sending activities to recipients' inboxes. By default, this uses an exponential backoff strategy with a maximum of 10 attempts and a maximum delay of 12 hours.
inboxRetryPolicy: RetryPolicy
The retry policy for processing incoming activities. By default, this uses an exponential backoff strategy with a maximum of 10 attempts and a maximum delay of 12 hours.
trailingSlashInsensitive: boolean
Whether the router should be insensitive to trailing slashes in the URL
paths. For example, if this option is true
, /foo
and /foo/
are
treated as the same path. Turned off by default.