From bfe2ef6bfae03444a232883fc7c449206cf3bee4 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 21 Feb 2019 17:19:16 +0100 Subject: Add request body limit --- server/lib/hls.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/lib/hls.ts') diff --git a/server/lib/hls.ts b/server/lib/hls.ts index 3575981f4..16a805ac2 100644 --- a/server/lib/hls.ts +++ b/server/lib/hls.ts @@ -116,7 +116,8 @@ function downloadPlaylistSegments (playlistUrl: string, destinationDir: string, for (const fileUrl of fileUrls) { const destPath = join(tmpDirectory, basename(fileUrl)) - await doRequestAndSaveToFile({ uri: fileUrl }, destPath) + const bodyKBLimit = 10 * 1000 * 1000 // 10GB + await doRequestAndSaveToFile({ uri: fileUrl }, destPath, bodyKBLimit) } clearTimeout(timer) -- cgit v1.2.3