1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Add more headers to broadcast/unicast

This commit is contained in:
Chocobozzz 2018-10-10 08:51:58 +02:00
parent 6321cbc3e7
commit 729bb18481
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 25 additions and 10 deletions

View file

@ -3,7 +3,7 @@ import * as Bluebird from 'bluebird'
import { logger } from '../../../helpers/logger'
import { doRequest } from '../../../helpers/requests'
import { ActorFollowModel } from '../../../models/activitypub/actor-follow'
import { buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils'
import { buildGlobalHeaders, buildSignedRequestOptions, computeBody } from './utils/activitypub-http-utils'
import { BROADCAST_CONCURRENCY, JOB_REQUEST_TIMEOUT } from '../../../initializers'
export type ActivitypubHttpBroadcastPayload = {
@ -25,7 +25,8 @@ async function processActivityPubHttpBroadcast (job: Bull.Job) {
uri: '',
json: body,
httpSignature: httpSignatureOptions,
timeout: JOB_REQUEST_TIMEOUT
timeout: JOB_REQUEST_TIMEOUT,
headers: buildGlobalHeaders(body)
}
const badUrls: string[] = []