1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 18:29:27 +02:00

Fix federation with pleroma

This commit is contained in:
Chocobozzz 2020-03-12 14:14:00 +01:00
parent 8227643bce
commit 84ebcf345c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
3 changed files with 132 additions and 125 deletions

View file

@ -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
}
}