1
0
Fork 0
forked from svrjs/svrjs

Remove unneeded global flag for /\.$/ regular expression

This commit is contained in:
Dorian Niemiec 2024-08-27 21:49:06 +02:00
parent 30498263fc
commit 12a4bcdc8a

View file

@ -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(