mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
catch security error when setting env urls
This commit is contained in:
@@ -11,6 +11,7 @@ function ApiService(tokenService, appIdService, utilsService, constantsService,
|
|||||||
|
|
||||||
function initApiService() {
|
function initApiService() {
|
||||||
ApiService.prototype.setUrls = function () {
|
ApiService.prototype.setUrls = function () {
|
||||||
|
try {
|
||||||
var storedBaseUrl = window.localStorage.getItem(this.constantsService.baseUrlKey);
|
var storedBaseUrl = window.localStorage.getItem(this.constantsService.baseUrlKey);
|
||||||
|
|
||||||
if (storedBaseUrl) {
|
if (storedBaseUrl) {
|
||||||
@@ -26,6 +27,11 @@ function initApiService() {
|
|||||||
this.identityBaseUrl = storedIdentityUrl;
|
this.identityBaseUrl = storedIdentityUrl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
console.log('Unable to set custom environment URLs:');
|
||||||
|
console.log(e);
|
||||||
|
}
|
||||||
|
|
||||||
// Desktop
|
// Desktop
|
||||||
//this.baseUrl = 'http://localhost:4000';
|
//this.baseUrl = 'http://localhost:4000';
|
||||||
|
|||||||
Reference in New Issue
Block a user