From 6bc064b474df585bac86fa88081a55f5caefe48b Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 11 Feb 2024 15:04:02 +0100 Subject: [PATCH] Fix non-3xx code detection --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 79d426c..810b987 100644 --- a/index.js +++ b/index.js @@ -143,7 +143,7 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e } } - if (code < 300 && code > 399 && hasLocation) { + if ((code < 300 || code > 399) && hasLocation) { code = 302; msg = "Found"; }