From a7159f2a72521f3d4fa135044e5f5da3673e7848 Mon Sep 17 00:00:00 2001 From: Alan Grainger Date: Mon, 11 Nov 2024 12:10:53 +0100 Subject: [PATCH] Add accept-ranges header --- app/src/render.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/render.ts b/app/src/render.ts index 0f3414e..09d4550 100644 --- a/app/src/render.ts +++ b/app/src/render.ts @@ -24,7 +24,8 @@ class Render { const startByte = parseInt(start, 10) || 0 const endByte = startByte + 2499999 headers.range = `bytes=${startByte}-${endByte}` - headerList.push('accept-ranges', 'content-range') + headerList.push('cache-control', 'content-range') + res.setHeader('accept-ranges', 'bytes') res.status(206) // Partial Content } const url = immich.buildUrl(immich.apiUrl() + '/assets/' + encodeURIComponent(asset.id) + subpath, {