From 12a4bcdc8a3e09d0277b244d4edf03f85251fcb4 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Tue, 27 Aug 2024 21:49:06 +0200 Subject: [PATCH] Remove unneeded global flag for /\.$/ regular expression --- src/handlers/requestHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/requestHandler.js b/src/handlers/requestHandler.js index 6bc471c..c756ee7 100644 --- a/src/handlers/requestHandler.js +++ b/src/handlers/requestHandler.js @@ -266,7 +266,7 @@ function requestHandler(req, res) { if (typeof req.headers.host == "string") { req.headers.host = req.headers.host.toLowerCase(); if (!req.headers.host.match(/^\.+$/)) - req.headers.host = req.headers.host.replace(/\.$/g, ""); + req.headers.host = req.headers.host.replace(/\.$/, ""); } logFacilities.reqmessage(