1
0
Fork 0
forked from svrjs/svrjs

Replace the placeholder fromMain with estimated one.

This commit is contained in:
Dorian Niemiec 2024-08-23 21:41:31 +02:00
parent d5c4e9aeaf
commit 0e8b8392a4

View file

@ -75,6 +75,9 @@ module.exports = (req, res, logFacilities, config, next) => {
return ph;
};
// Estimate fromMain from SVR.JS 3.x
let fromMain = !(config.secure && !req.socket.encrypted);
// Make HTTP/1.x API-based scripts compatible with HTTP/2.0 API
if (config.enableHTTP2 == true && req.httpVersion == "2.0") {
// Set HTTP/1.x methods (to prevent process warnings)
@ -197,9 +200,6 @@ module.exports = (req, res, logFacilities, config, next) => {
}
});
// TODO: fromMain
let fromMain = true;
req.isProxy = false;
if (req.url[0] != "/" && req.url != "*") req.isProxy = true;
logFacilities.locmessage(