From 6920134caf787706b41ffd9bc982a00d2e13f320 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 5 Jul 2022 13:25:34 -0700 Subject: [PATCH] Fixed web relay host header. --- apprelays.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apprelays.js b/apprelays.js index 375f00ba..2a33729a 100644 --- a/apprelays.js +++ b/apprelays.js @@ -223,8 +223,7 @@ module.exports.CreateWebRelay = function (parent, db, args, domain) { // Construct the HTTP request var request = req.method + ' ' + req.url + ' HTTP/' + req.httpVersion + '\r\n'; - const blockedHeaders = ['host', 'origin', 'cookie', 'upgrade-insecure-requests', 'sec-ch-ua', 'sec-ch-ua-mobile', 'dnt', 'sec-fetch-user', 'sec-ch-ua-platform', 'sec-fetch-site', 'sec-fetch-mode', 'sec-fetch-dest']; // These are headers we do not forward - request += 'host: central.mesh.meshcentral.com\r\n'; + const blockedHeaders = ['origin', 'cookie', 'upgrade-insecure-requests', 'sec-ch-ua', 'sec-ch-ua-mobile', 'dnt', 'sec-fetch-user', 'sec-ch-ua-platform', 'sec-fetch-site', 'sec-fetch-mode', 'sec-fetch-dest']; // These are headers we do not forward for (var i in req.headers) { if (blockedHeaders.indexOf(i) == -1) { request += i + ': ' + req.headers[i] + '\r\n'; } } var cookieStr = ''; for (var i in parent.webCookies) { if (cookieStr != '') { cookieStr += '; ' } cookieStr += (i + '=' + parent.webCookies[i].value); }