Loading CHANGES.md +27 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,33 @@ To be released. [#368]: https://github.com/fedify-dev/fedify/pull/368 Version 1.8.6 ------------- Released on August 24, 2025. ### @fedify/nestjs - Fixed a critical error that prevented the middleware from processing ActivityPub requests in NestJS applications. The middleware now correctly handles request bodies that have been pre-processed by other NestJS middleware or interceptors. [[#279], [#386] by Jaeyeol Lee] [#279]: https://github.com/fedify-dev/fedify/issues/279 [#386]: https://github.com/fedify-dev/fedify/pull/386 ### @fedify/testing - Updated exports to include context creation functions. [[#382] by Colin Mitchell] - Added `createContext()` function. - Added `createInboxContext()` function. - Added `createRequestContext()` function. [#382]: https://github.com/fedify-dev/fedify/pull/382 Version 1.8.5 ------------- Loading docs/manual/integration.md +7 −2 Original line number Diff line number Diff line Loading @@ -393,6 +393,7 @@ import { RequestMethod, } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import * as express from 'express'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { DatabaseModule } from './database/database.module'; Loading Loading @@ -439,8 +440,12 @@ export class AppModule implements NestModule { }, ); // Apply middleware to all routes except auth endpoints consumer.apply(fedifyMiddleware).forRoutes({ path: '*', method: RequestMethod.ALL }); // Fedify middleware requires the raw request body for HTTP signature verification // so we apply `express.raw()` before `fedifyMiddleware` to preserve the body. consumer.apply( express.raw({ type: '*/*' }), fedifyMiddleware ).forRoutes({ path: '*', method: RequestMethod.ALL }); } } ~~~~ Loading mise.toml +1 −1 Original line number Diff line number Diff line [tools] bun = "latest" deno = "2.4.4" deno = "2.4.5" node = "22" "npm:pnpm" = "latest" packages/nestjs/README.md +8 −2 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ import { NestModule, RequestMethod, } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import * as express from 'express'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { DatabaseModule } from './database/database.module'; Loading Loading @@ -117,8 +119,12 @@ export class AppModule implements NestModule { }, ); // Apply middleware to all routes except auth endpoints consumer.apply(fedifyMiddleware) // Fedify middleware requires the raw request body for HTTP signature verification // so we apply `express.raw()` before `fedifyMiddleware` to preserve the body. consumer.apply( express.raw({ type: '*/*' }), fedifyMiddleware, ).forRoutes({ path: '*', method: RequestMethod.ALL } } Loading packages/nestjs/src/fedify.middleware.ts +1 −3 Original line number Diff line number Diff line Loading @@ -86,9 +86,7 @@ function fromERequest(req: ERequest): Request { headers, // @ts-ignore: duplex is not supported in Deno, but it is in Node.js duplex: "half", body: req.method === "GET" || req.method === "HEAD" ? undefined : (Readable.toWeb(req)), body: req.method === "GET" || req.method === "HEAD" ? undefined : (req.body && typeof req.body === 'object' && !Buffer.isBuffer(req.body) ? JSON.stringify(req.body) : req.body), }); } Loading Loading
CHANGES.md +27 −0 Original line number Diff line number Diff line Loading @@ -83,6 +83,33 @@ To be released. [#368]: https://github.com/fedify-dev/fedify/pull/368 Version 1.8.6 ------------- Released on August 24, 2025. ### @fedify/nestjs - Fixed a critical error that prevented the middleware from processing ActivityPub requests in NestJS applications. The middleware now correctly handles request bodies that have been pre-processed by other NestJS middleware or interceptors. [[#279], [#386] by Jaeyeol Lee] [#279]: https://github.com/fedify-dev/fedify/issues/279 [#386]: https://github.com/fedify-dev/fedify/pull/386 ### @fedify/testing - Updated exports to include context creation functions. [[#382] by Colin Mitchell] - Added `createContext()` function. - Added `createInboxContext()` function. - Added `createRequestContext()` function. [#382]: https://github.com/fedify-dev/fedify/pull/382 Version 1.8.5 ------------- Loading
docs/manual/integration.md +7 −2 Original line number Diff line number Diff line Loading @@ -393,6 +393,7 @@ import { RequestMethod, } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import * as express from 'express'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { DatabaseModule } from './database/database.module'; Loading Loading @@ -439,8 +440,12 @@ export class AppModule implements NestModule { }, ); // Apply middleware to all routes except auth endpoints consumer.apply(fedifyMiddleware).forRoutes({ path: '*', method: RequestMethod.ALL }); // Fedify middleware requires the raw request body for HTTP signature verification // so we apply `express.raw()` before `fedifyMiddleware` to preserve the body. consumer.apply( express.raw({ type: '*/*' }), fedifyMiddleware ).forRoutes({ path: '*', method: RequestMethod.ALL }); } } ~~~~ Loading
mise.toml +1 −1 Original line number Diff line number Diff line [tools] bun = "latest" deno = "2.4.4" deno = "2.4.5" node = "22" "npm:pnpm" = "latest"
packages/nestjs/README.md +8 −2 Original line number Diff line number Diff line Loading @@ -71,6 +71,8 @@ import { NestModule, RequestMethod, } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import * as express from 'express'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { DatabaseModule } from './database/database.module'; Loading Loading @@ -117,8 +119,12 @@ export class AppModule implements NestModule { }, ); // Apply middleware to all routes except auth endpoints consumer.apply(fedifyMiddleware) // Fedify middleware requires the raw request body for HTTP signature verification // so we apply `express.raw()` before `fedifyMiddleware` to preserve the body. consumer.apply( express.raw({ type: '*/*' }), fedifyMiddleware, ).forRoutes({ path: '*', method: RequestMethod.ALL } } Loading
packages/nestjs/src/fedify.middleware.ts +1 −3 Original line number Diff line number Diff line Loading @@ -86,9 +86,7 @@ function fromERequest(req: ERequest): Request { headers, // @ts-ignore: duplex is not supported in Deno, but it is in Node.js duplex: "half", body: req.method === "GET" || req.method === "HEAD" ? undefined : (Readable.toWeb(req)), body: req.method === "GET" || req.method === "HEAD" ? undefined : (req.body && typeof req.body === 'object' && !Buffer.isBuffer(req.body) ? JSON.stringify(req.body) : req.body), }); } Loading