From 89bc4ecdf00c82656fad5a3995052136db00f166 Mon Sep 17 00:00:00 2001 From: Elbert Alias <77259+AliasIO@users.noreply.github.com> Date: Thu, 4 Jun 2020 09:07:17 +1000 Subject: [PATCH] Fix for relative redirects --- src/drivers/npm/driver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/npm/driver.js b/src/drivers/npm/driver.js index d6958a696..fcc6dd6be 100644 --- a/src/drivers/npm/driver.js +++ b/src/drivers/npm/driver.js @@ -329,7 +329,7 @@ class Site { if (response.status() >= 300 && response.status() < 400) { if (this.headers.location) { - url = new URL(this.headers.location.slice(-1)) + url = new URL(this.headers.location.slice(-1), url) } } else { responseReceived = true