]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/requests.ts
Fetch directly all video attributes for get API
[github/Chocobozzz/PeerTube.git] / server / helpers / requests.ts
index 5eb69486d4dbe11b3bbfda034a4950c4711343d1..fd2a56f30c717e6ce892b1fd90deca6af228a327 100644 (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 }
   }