From ed590c26e348553a3716d2cb76838370ae11a5b3 Mon Sep 17 00:00:00 2001 From: akashnimare Date: Thu, 23 Nov 2017 22:38:28 +0530 Subject: [PATCH] Added whitelist zulip server --- app/renderer/js/utils/domain-util.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/renderer/js/utils/domain-util.js b/app/renderer/js/utils/domain-util.js index 378ba338..4dc5eea5 100644 --- a/app/renderer/js/utils/domain-util.js +++ b/app/renderer/js/utils/domain-util.js @@ -115,6 +115,10 @@ class DomainUtil { 'Error: unable to verify the first certificate', 'Error: unable to get local issuer certificate' ]; + // If the domain contains following strings we just bypass the server + const whitelistDomains = [ + 'zulipdev.org' + ]; if (!error && response.statusCode !== 404) { // Correct this.getServerSettings(domain).then(serverSettings => { @@ -122,7 +126,7 @@ class DomainUtil { }, () => { resolve(serverConf); }); - } else if (certsError.indexOf(error.toString()) >= 0) { + } else if (domain.indexOf(whitelistDomains) >= 0 || certsError.indexOf(error.toString()) >= 0) { if (silent) { this.getServerSettings(domain).then(serverSettings => { resolve(serverSettings);