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:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user