From 7bd4eb728d27636321e9ac6dadd764ef5fa95af1 Mon Sep 17 00:00:00 2001 From: Raphael Kabo Date: Fri, 2 Feb 2024 12:14:38 +0000 Subject: refactor: send and accept only spec-compliant AP headers --- src/app.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/app.ts') diff --git a/src/app.ts b/src/app.ts index 3370d27..f3c99c7 100755 --- a/src/app.ts +++ b/src/app.ts @@ -9,6 +9,10 @@ import group from "./routes/group.js"; import staticPages from "./routes/static.js"; import { initEmailService } from "./lib/email.js"; +import { + activityPubContentType, + alternateActivityPubContentType, +} from "./lib/activitypub.js"; const app = express(); @@ -48,8 +52,8 @@ app.set("hbsInstance", hbsInstance); app.use(express.static("public")); // Body parser // -app.use(express.json({ type: "application/activity+json" })); -app.use(express.json({ type: "application/ld+json" })); +app.use(express.json({ type: alternateActivityPubContentType })); +app.use(express.json({ type: activityPubContentType })); app.use(express.json({ type: "application/json" })); app.use(express.urlencoded({ extended: true })); -- cgit v1.2.3