From 1051fc4da7c81c94ef67a0278edeb7f905b28f08 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 14 Mar 2022 17:43:51 +0530 Subject: [PATCH] fix undefined safe origin --- lib/env.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/env.js b/lib/env.js index 4e718e0c2..4262e3fbf 100644 --- a/lib/env.js +++ b/lib/env.js @@ -39,6 +39,8 @@ module.exports.create = function (config) { NO_SANDBOX = true; if (typeof(config.httpSafePort) !== 'number') { httpSafePort = httpPort + 1; } httpSafeOrigin = deriveSandboxOrigin(httpUnsafeOrigin, httpSafePort); + } else { + httpSafeOrigin = canonicalizeOrigin(config.httpSafeOrigin); } var permittedEmbedders = config.permittedEmbedders;