diff --git a/webserver.js b/webserver.js index 20083ecb..90a2c8ea 100644 --- a/webserver.js +++ b/webserver.js @@ -4888,7 +4888,7 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) { } else { // Use default security headers var geourl = (domain.geolocation ? ' *.openstreetmap.org' : ''); - var selfurl = (' wss://' + req.headers.host); + var selfurl = req.headers['x-forwarded-host'] ? (' wss://' + req.headers['x-forwarded-host']) : (' wss://' + req.headers.host); var headers = { 'Referrer-Policy': 'no-referrer', 'X-XSS-Protection': '1; mode=block',