diff options
author | Chocobozzz <me@florianbigard.com> | 2020-03-12 14:14:00 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-03-12 14:14:11 +0100 |
commit | 84ebcf345cb82b254853c03c142f7c304fb072dd (patch) | |
tree | 91dac605f98dd606426dd9e143706a08baa00b6e /server | |
parent | 8227643bce85747953eb43ddc553f14d29bc475f (diff) | |
download | PeerTube-84ebcf345cb82b254853c03c142f7c304fb072dd.tar.gz PeerTube-84ebcf345cb82b254853c03c142f7c304fb072dd.tar.zst PeerTube-84ebcf345cb82b254853c03c142f7c304fb072dd.zip |
Fix federation with pleroma
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/job-queue/handlers/utils/activitypub-http-utils.ts | 6 |
1 files changed, 4 insertions, 2 deletions
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 | |||
2 | import { getServerActor } from '../../../../helpers/utils' | 2 | import { getServerActor } from '../../../../helpers/utils' |
3 | import { ActorModel } from '../../../../models/activitypub/actor' | 3 | import { ActorModel } from '../../../../models/activitypub/actor' |
4 | import { sha256 } from '../../../../helpers/core-utils' | 4 | import { sha256 } from '../../../../helpers/core-utils' |
5 | import { HTTP_SIGNATURE } from '../../../../initializers/constants' | 5 | import { ACTIVITY_PUB, HTTP_SIGNATURE } from '../../../../initializers/constants' |
6 | import { MActor } from '../../../../typings/models' | 6 | import { MActor } from '../../../../typings/models' |
7 | 7 | ||
8 | type Payload = { body: any, contextType?: ContextType, signatureActorId?: number } | 8 | type Payload = { body: any, contextType?: ContextType, signatureActorId?: number } |
@@ -42,7 +42,9 @@ async function buildSignedRequestOptions (payload: Payload) { | |||
42 | 42 | ||
43 | function buildGlobalHeaders (body: any) { | 43 | function buildGlobalHeaders (body: any) { |
44 | return { | 44 | return { |
45 | Digest: buildDigest(body) | 45 | 'Digest': buildDigest(body), |
46 | 'Content-Type': 'application/activity+json', | ||
47 | 'Accept': ACTIVITY_PUB.ACCEPT_HEADER | ||
46 | } | 48 | } |
47 | } | 49 | } |
48 | 50 | ||