From 6a804c763f0c583c5bb9f9f3f916ba6a5841613a Mon Sep 17 00:00:00 2001 From: brad Date: Tue, 27 Oct 2020 11:43:50 +0200 Subject: [PATCH] send back the content-range header This header will be used to determine whether the whole body has been retrieved OHM-1039 --- src/api/transactions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/transactions.js b/src/api/transactions.js index f2f459d73..cdb5011fe 100644 --- a/src/api/transactions.js +++ b/src/api/transactions.js @@ -522,6 +522,7 @@ export async function getTransactionBodyById (ctx, transactionId, bodyId) { ctx.status = rangeHeader ? 206 : 200 ctx.set('accept-ranges', 'bytes') ctx.set('content-type', 'application/text') + ctx.set('access-control-expose-headers', 'content-range, content-length, content-type') if (rangeHeader) { ctx.set('content-range', `bytes ${range.start}-${range.end}/${body.fileDetails.length}`) ctx.set('content-length', Math.min((range.end - range.start) + 1, body.fileDetails.length))