From 97bc784e7fc48e8ba5e000915aae5a9928c73295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= Date: Mon, 22 Apr 2024 00:06:54 +0200 Subject: [PATCH] fix options passed to head request --- src/file.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/file.js b/src/file.js index b430f7b..e7993da 100644 --- a/src/file.js +++ b/src/file.js @@ -792,7 +792,7 @@ export async function vinylize(src, options = {}) { } else if (filepath && isRemote(filepath)) { let url = filepath; try { - const response = await fetch(filepath, {options, request: {method: 'head'}}); + const response = await fetch(filepath, {...options, request: {...options.request, method: 'head'}}); if (response.url !== url) { debug(`(vinylize) found redirect from ${url} to ${response.url}`); url = response.url;