ソースを参照

fix(api): satisfy oxlint same-type operand rule in range header

_Kerman 3 週間 前
親
コミット
b685a9a6b0
1 ファイル変更、1 行追加、1 行削除
  1. 1 1
      packages/api/session-controller/src/media-references.ts

+ 1 - 1
packages/api/session-controller/src/media-references.ts

@@ -167,7 +167,7 @@ export async function serveMediaReference(
     'Cache-Control': 'private, no-store',
     'X-Content-Type-Options': 'nosniff',
   }
-  if (partial) headers['Content-Range'] = 'bytes ' + start + '-' + end + '/' + String(info.size)
+  if (partial) headers['Content-Range'] = 'bytes ' + String(start) + '-' + String(end) + '/' + String(info.size)
   const head = request.method === 'HEAD'
   return new Response(head ? null : body, { status: partial ? 206 : 200, headers })
 }