forked from svrjs/svrjs
Add Host header processing
This commit is contained in:
parent
63f8e98add
commit
aac6323401
1 changed files with 3 additions and 0 deletions
3
svr.js
3
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 {
|
||||
|
|
Reference in a new issue