From e3a088ccafe27bc234cdf3e67f8218d1525b5fb1 Mon Sep 17 00:00:00 2001 From: Sergey Linnik Date: Wed, 7 Jun 2023 13:29:45 +0500 Subject: [PATCH] nodejs: fix undefined header --- web/documentserver-example/nodejs/helpers/docManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/documentserver-example/nodejs/helpers/docManager.js b/web/documentserver-example/nodejs/helpers/docManager.js index b0d062da..8dbfa9e4 100644 --- a/web/documentserver-example/nodejs/helpers/docManager.js +++ b/web/documentserver-example/nodejs/helpers/docManager.js @@ -178,7 +178,7 @@ docManager.prototype.getServerPath = function () { // get host address from the request docManager.prototype.getServerHost = function () { - return this.getProtocol() + "://" + (this.req.headers["x-forwarded-host"] || this.req.headers["host"]) + this.req.headers["x-forwarded-prefix"]; + return this.getProtocol() + "://" + (this.req.headers["x-forwarded-host"] || this.req.headers["host"]) + (this.req.headers["x-forwarded-prefix"] || ""); }; // get protocol from the request