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

Fix AP security tests

This commit is contained in:
Chocobozzz 2021-03-10 11:17:20 +01:00
parent 266131e0ca
commit e7053b1d9d
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 36 additions and 17 deletions

View file

@ -170,9 +170,11 @@ function buildGotOptions (options: PeerTubeRequestOptions) {
let headers = options.headers || {}
headers = { ...headers, date: new Date().toUTCString() }
if (!headers.date) {
headers = { ...headers, date: new Date().toUTCString() }
}
if (activityPub) {
if (activityPub && !headers.accept) {
headers = { ...headers, accept: ACTIVITY_PUB.ACCEPT_HEADER }
}