From 84ebcf345cb82b254853c03c142f7c304fb072dd Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 12 Mar 2020 14:14:00 +0100 Subject: Fix federation with pleroma --- server/lib/job-queue/handlers/utils/activitypub-http-utils.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'server/lib/job-queue/handlers') diff --git a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts index 54b35840d..258ffabee 100644 --- a/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts +++ b/server/lib/job-queue/handlers/utils/activitypub-http-utils.ts @@ -2,7 +2,7 @@ import { buildSignedActivity, ContextType } from '../../../../helpers/activitypu import { getServerActor } from '../../../../helpers/utils' import { ActorModel } from '../../../../models/activitypub/actor' import { sha256 } from '../../../../helpers/core-utils' -import { HTTP_SIGNATURE } from '../../../../initializers/constants' +import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants' import { MActor } from '../../../../typings/models' type Payload = { body: any, contextType?: ContextType, signatureActorId?: number } @@ -42,7 +42,9 @@ async function buildSignedRequestOptions (payload: Payload) { function buildGlobalHeaders (body: any) { return { - Digest: buildDigest(body) + 'Digest': buildDigest(body), + 'Content-Type': 'application/activity+json', + 'Accept': ACTIVITY_PUB.ACCEPT_HEADER } } -- cgit v1.2.3