From 0e8b8392a4c72c544ab97e59114ceb5cc53d1897 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Fri, 23 Aug 2024 21:41:31 +0200 Subject: [PATCH] Replace the placeholder fromMain with estimated one. --- src/middleware/core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/middleware/core.js b/src/middleware/core.js index 7a1b703..75a9a95 100644 --- a/src/middleware/core.js +++ b/src/middleware/core.js @@ -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(