🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

@fedify/next

Package Overview
Dependencies
Maintainers
1
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fedify/next

Integrate Fedify with Next.js

latest
Source
npmnpm
Version
1.9.1
Version published
Weekly downloads
955
80.87%
Maintainers
1
Weekly downloads
 
Created
Source

@fedify/next: Integrate Fedify with Next.js

Follow @fedify@hollo.social

This package provides a simple way to integrate Fedify with Next.js.

[!IMPORTANT] We recommend initializing your app using the init command of the Fedify CLI rather than installing this package directly.

[!IMPORTANT] This package runs Next.js middleware on the Node.js runtime. Therefore, you must use version 15.5 or later, or at least 15.4 canary. For more details, refer to the official documentation of middleware.

Usage

// --- middleware.ts ---
import { fedifyWith } from "@fedify/next";
import { federation } from "./federation";

export default fedifyWith(federation)();

// This config must be defined on `middleware.ts`.
export const config = {
  runtime: "nodejs",
  matcher: [
    {
      source: "/:path*",
      has: [
        {
          type: "header",
          key: "Accept",
          value: ".*application\\/((jrd|activity|ld)\\+json|xrd\\+xml).*",
        },
      ],
    },
    {
      source: "/:path*",
      has: [
        {
          type: "header",
          key: "content-type",
          value: ".*application\\/((jrd|activity|ld)\\+json|xrd\\+xml).*",
        },
      ],
    },
    { source: "/.well-known/nodeinfo" },
    { source: "/.well-known/x-nodeinfo2" },
  ],
};

Keywords

Fedify

FAQs

Package last updated on 31 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts