From 1a2019664a551ac1e8f72c4fbe9248f9a258f3c2 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Thu, 18 Jan 2024 01:12:09 +0100 Subject: [PATCH] Fixed error handling for invalid URL rewrite regexes. Also fixed bug with HTTP proxy not working. --- svr.js | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/svr.js b/svr.js index c770620..a02ba7c 100644 --- a/svr.js +++ b/svr.js @@ -4168,9 +4168,9 @@ if (!cluster.isPrimary) { // Handle URL rewriting function rewriteURL(address, map, callback, _fileState, _mapBegIndex) { var rewrittenURL = address; + var doCallback = true; if (!isProxy) { - var doCallback = true; - for(var i=(_mapBegIndex ? _mapBegIndex : 0);i " + rewrittenURL); req.url = rewrittenURL;