From 3c0a1fdc8e15111cfb80ee6272932cddd2fd8f72 Mon Sep 17 00:00:00 2001 From: mbaharip <62494292+mbahArip@users.noreply.github.com> Date: Mon, 6 May 2024 01:53:31 +0700 Subject: [PATCH] Fix range header, added on the wrong request --- src/app/api/stream/[encryptedId]/route.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/api/stream/[encryptedId]/route.ts b/src/app/api/stream/[encryptedId]/route.ts index 486f534..3039dc9 100644 --- a/src/app/api/stream/[encryptedId]/route.ts +++ b/src/app/api/stream/[encryptedId]/route.ts @@ -78,7 +78,8 @@ export async function GET( responseType: "stream", headers: { "Accept-Ranges": "bytes", - "Range": ranges, + "Range": + ranges === "bytes=0-" ? `bytes=0-${1024 * 1024 - 1}` : ranges, }, }, );