From 8700345ccc0c9d69e96bff7cd5304a44b0d62011 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 17 Feb 2020 08:48:15 -0500 Subject: [PATCH 1/2] add missing connect-src directives to example nginx conf --- docs/example.nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/example.nginx.conf b/docs/example.nginx.conf index 6d45b8198..80c799f8c 100644 --- a/docs/example.nginx.conf +++ b/docs/example.nginx.conf @@ -72,7 +72,7 @@ server { set $styleSrc "'unsafe-inline' 'self' ${main_domain}"; # connect-src restricts URLs which can be loaded using script interfaces - set $connectSrc "'self' https://${main_domain} $main_domain https://${api_domain} blob:"; + set $connectSrc "'self' https://${main_domain} ${main_domain} https://${api_domain} blob: wss://${api_domain} ${api_domain} ${files_domain}"; # fonts can be loaded from data-URLs or the main domain set $fontSrc "'self' data: ${main_domain}"; From b56367414b085131710f37b8ca1489dda9cd2603 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 17 Feb 2020 11:31:00 -0500 Subject: [PATCH 2/2] don't overwrite cached indices when new users join a channel --- lib/historyKeeper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/historyKeeper.js b/lib/historyKeeper.js index 03f31383b..348e3cc3f 100644 --- a/lib/historyKeeper.js +++ b/lib/historyKeeper.js @@ -45,7 +45,7 @@ module.exports.create = function (config, cb) { HK.dropChannel(Env, channelName); }, channelOpen: function (Server, channelName, userId) { - Env.channel_cache[channelName] = {}; + Env.channel_cache[channelName] = Env.channel_cache[channelName] || {}; Server.send(userId, [ 0, Env.id,