mirror of
https://github.com/alangrainger/immich-public-proxy.git
synced 2024-12-28 03:41:58 +00:00
Add accept-ranges header
This commit is contained in:
parent
4310a92ea7
commit
a7159f2a72
1 changed files with 2 additions and 1 deletions
|
@ -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, {
|
||||
|
|
Loading…
Reference in a new issue