1
0
Fork 0
forked from svrjs/svrjs

Add Host header processing

This commit is contained in:
Dorian Niemiec 2023-12-15 00:15:54 +01:00
parent 63f8e98add
commit aac6323401

3
svr.js
View file

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