1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00: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'; 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) { if (this.signalrConnection != null) {
this.signalrConnection.off('ReceiveMessage'); this.signalrConnection.off('ReceiveMessage');
await this.signalrConnection.stop(); await this.signalrConnection.stop();
@@ -64,6 +70,9 @@ export class NotificationsService implements NotificationsServiceAbstraction {
} }
async updateConnection(sync = false): Promise<void> { async updateConnection(sync = false): Promise<void> {
if (!this.inited) {
return;
}
try { try {
if (await this.isAuthedAndUnlocked()) { if (await this.isAuthedAndUnlocked()) {
await this.reconnect(sync); await this.reconnect(sync);