1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-27 04:03:00 +02:00

disable notifications server url with https://-

This commit is contained in:
Kyle Spearrin 2018-08-23 09:25:39 -04:00
parent 5d95fc733c
commit 2dc77b6143

View File

@ -37,6 +37,12 @@ export class NotificationsService implements NotificationsServiceAbstraction {
this.url = environmentService.baseUrl + '/notifications';
}
// Set notifications server URL to `https://-` to effectively disable communication
// with the notifications server from the client app
if (this.url === 'https://-') {
return;
}
if (this.signalrConnection != null) {
this.signalrConnection.off('ReceiveMessage');
await this.signalrConnection.stop();
@ -64,6 +70,9 @@ export class NotificationsService implements NotificationsServiceAbstraction {
}
async updateConnection(sync = false): Promise<void> {
if (!this.inited) {
return;
}
try {
if (await this.isAuthedAndUnlocked()) {
await this.reconnect(sync);