]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/requests.ts
Remove old federation compatibility
[github/Chocobozzz/PeerTube.git] / server / helpers / requests.ts
index 5354780170da2852f6287bbc6e23ebcdc8c5909b..99127095210638a9390502311626dab425325f1a 100644 (file)
@@ -96,10 +96,6 @@ const peertubeGot = got.extend({
             path
           }, httpSignatureOptions)
         }
-      },
-
-      (options: GotOptions) => {
-        options.timeout = REQUEST_TIMEOUT
       }
     ]
   }
@@ -190,7 +186,8 @@ export {
   doRequest,
   doJSONRequest,
   doRequestAndSaveToFile,
-  downloadImage
+  downloadImage,
+  peertubeGot
 }
 
 // ---------------------------------------------------------------------------
@@ -213,6 +210,7 @@ function buildGotOptions (options: PeerTubeRequestOptions) {
   return {
     method: options.method,
     dnsCache: true,
+    timeout: REQUEST_TIMEOUT,
     json: options.json,
     searchParams: options.searchParams,
     headers,