From 3900ffbbc60bb05139fe1299454e4c2c5869d508 Mon Sep 17 00:00:00 2001 From: Dmitriy Aleksandrovich Date: Tue, 22 Sep 2020 15:00:53 +0300 Subject: [PATCH] add fetch options add fetch options to pass headers --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fc08161..fdcd7aa 100644 --- a/index.js +++ b/index.js @@ -171,7 +171,7 @@ const middleWare = (module.exports = function(options) { path.join(options.cacheDir, dir1, dir2, dir3) ); - const blob = await (await fetch(res.locals.fetchUrl)).blob(); + const blob = await (await fetch(res.locals.fetchUrl, res.locals.options)).blob(); const fileName = middleWare.encodeAssetCacheName(blob.type, blob.size);