From a3e4ee23286e9edf499a993d1eb174320fb8cfe2 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sat, 24 Aug 2024 08:24:39 +0200 Subject: [PATCH] Replace some var's with const's in URL rewrite and web root postfix middleware. --- src/middleware/rewriteURL.js | 4 ++-- src/middleware/webRootPostfixes.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/middleware/rewriteURL.js b/src/middleware/rewriteURL.js index ef133d1..2402d74 100644 --- a/src/middleware/rewriteURL.js +++ b/src/middleware/rewriteURL.js @@ -128,11 +128,11 @@ module.exports = (req, res, logFacilities, config, next) => { return; } - var sHref = sanitizeURL( + const sHref = sanitizeURL( req.parsedURL.pathname, config.allowDoubleSlashes, ); - var preparedReqUrl2 = + const preparedReqUrl2 = req.parsedURL.pathname + req.parsedURL.search + req.parsedURL.hash; if ( diff --git a/src/middleware/webRootPostfixes.js b/src/middleware/webRootPostfixes.js index e613441..e41a096 100644 --- a/src/middleware/webRootPostfixes.js +++ b/src/middleware/webRootPostfixes.js @@ -95,11 +95,11 @@ module.exports = (req, res, logFacilities, config, next) => { return; } - var sHref = sanitizeURL( + const sHref = sanitizeURL( req.parsedURL.pathname, config.allowDoubleSlashes, ); - var preparedReqUrl2 = + const preparedReqUrl2 = req.parsedURL.pathname + req.parsedURL.search + req.parsedURL.hash; if (