From aac63234011ddbf90299802acaab1a9148b788b3 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Fri, 15 Dec 2023 00:15:54 +0100 Subject: [PATCH] Add Host header processing --- svr.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/svr.js b/svr.js index 9623fb6..023d163 100644 --- a/svr.js +++ b/svr.js @@ -2810,6 +2810,9 @@ if (!cluster.isPrimary) { return ph; } + // Process the Host header + if (typeof req.headers.host == "string") req.headers.host = req.headers.host.toLowerCase().replace(/^\.$/g,""); + // Make HTTP/1.x API-based scripts compatible with HTTP/2.0 API if (configJSON.enableHTTP2 == true && req.httpVersion == "2.0") { try {