Skip to content

Commit

Permalink
Added whitelist zulip server
Browse files Browse the repository at this point in the history
  • Loading branch information
akashnimare committed Nov 23, 2017
1 parent 6d10291 commit ed590c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/renderer/js/utils/domain-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,18 @@ 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 => {
resolve(serverSettings);
}, () => {
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);
Expand Down

0 comments on commit ed590c2

Please sign in to comment.