diff --git a/src/handlers/requestHandler.js b/src/handlers/requestHandler.js index 395e311..11311fd 100644 --- a/src/handlers/requestHandler.js +++ b/src/handlers/requestHandler.js @@ -709,7 +709,7 @@ function requestHandler(req, res) { // Call the next middleware function const next = () => { - const currentMiddleware = middleware[index++]; + let currentMiddleware = middleware[index++]; while (req.isProxy && currentMiddleware && !currentMiddleware.proxySafe) { currentMiddleware = middleware[index++]; }