Skip to main content
This release is 13 versions behind 1.3.3 — the latest version of @fedify/fedify. Jump to latest

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
3 months ago (1.2.1)
interface CreateFederationOptions

Options for createFederation function.

Properties

The key-value store used for caching, outbox queues, and inbox idempotence.

Prefixes for namespacing keys in the Deno KV store. By default, all keys are prefixed with ["_fedify"].

The message queue for sending activities to recipients' inboxes. If not provided, activities will not be queued and will be sent immediately.

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.

A custom JSON-LD document loader. By default, this uses the built-in cache-backed loader that fetches remote documents over HTTP(S).

A custom JSON-LD context loader. By default, this uses the same loader as the document loader.

A factory function that creates an authenticated document loader for a given identity. This is used for fetching documents that require authentication.

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.

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.

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.

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).

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.

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.

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.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { type CreateFederationOptions } from "@fedify/fedify";

---- OR ----

Import directly with a jsr specifier

import { type CreateFederationOptions } from "jsr:@fedify/fedify";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { type CreateFederationOptions } from "@fedify/fedify";

Add Package

yarn dlx jsr add @fedify/fedify

Import symbol

import { type CreateFederationOptions } from "@fedify/fedify";

Add Package

pnpm dlx jsr add @fedify/fedify

Import symbol

import { type CreateFederationOptions } from "@fedify/fedify";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { type CreateFederationOptions } from "@fedify/fedify";