From 4bab9117a02b3df0784cf30f062e9725065fc1cc Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Wed, 27 Sep 2023 02:35:31 +0000 Subject: [PATCH] change default content type --- src/activitypub/Server.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/activitypub/Server.ts b/src/activitypub/Server.ts index 16e894ec1..1f55f76cd 100644 --- a/src/activitypub/Server.ts +++ b/src/activitypub/Server.ts @@ -51,6 +51,14 @@ export class FederationServer extends Server { // TODO: auth // TODO: rate limits + this.app.use("*", (req, res, next) => { + res.setHeader( + "Content-Type", + "application/activity+json; charset=utf-8", + ); + next(); + }); + this.routes = await registerRoutes( this, path.join(__dirname, "routes", "/"),