From c59513ca6f080b5f7a4669118c672e3359c95055 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Mon, 20 Apr 2026 16:38:35 -0400 Subject: [PATCH] fix: don't interrupt redirect handling when manual redirect is passed-in in configs --- src/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/request.js b/src/request.js index 95fd75ee47..b096aa78ce 100644 --- a/src/request.js +++ b/src/request.js @@ -135,7 +135,7 @@ async function call(url, method, { body, timeout, jar, ...config } = {}) { const response = await fetchImpl(currentUrl, opts); // Handle redirects - if ([301, 302, 307, 308].includes(response.status)) { + if (config.redirect !== 'manual' && [301, 302, 307, 308].includes(response.status)) { const location = response.headers.get('location'); if (!location) break; // Handle relative URLs