From 26540b4b940e61c57b57ad1ac7a5333074b3d263 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 17 Oct 2018 13:48:31 +0200 Subject: [PATCH] correctly support httpSafeOrigin loaded from configuration file --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 17e793f29..d80131dc9 100644 --- a/server.js +++ b/server.js @@ -176,7 +176,7 @@ app.get('/api/config', function(req, res){ httpUnsafeOrigin: config.httpUnsafeOrigin, }, null, '\t'), 'obj.httpSafeOrigin = ' + (function () { - if (config.httpSafeOrigin) { return config.httpSafeOrigin; } + if (config.httpSafeOrigin) { return '"' + config.httpSafeOrigin + '"'; } if (config.httpSafePort) { return "(function () { return window.location.origin.replace(/\:[0-9]+$/, ':" + config.httpSafePort + "'); }())";