From 73a6353a981a6fbb285812550826074be69fef47 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 11 Feb 2024 15:03:27 +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 8a0a1a6..5bf8232 100644 --- a/index.js +++ b/index.js @@ -273,7 +273,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"; }