From 1d0b45e17daff5e2fb2b99575205c866688e192d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 16 Dec 2017 23:23:17 -0500 Subject: [PATCH] whiteListedDomains only on dev builds --- dist/.publish | 2 +- settings.Preview.json | 5 +---- settings.Production.json | 5 +---- settings.json | 5 +---- src/app/config.js | 10 +++++----- src/app/settings.js | 2 +- 6 files changed, 10 insertions(+), 19 deletions(-) diff --git a/dist/.publish b/dist/.publish index ff837aca94..2703863ee9 160000 --- a/dist/.publish +++ b/dist/.publish @@ -1 +1 @@ -Subproject commit ff837aca9488d126faa81f2ef83cdd2f31f59dc5 +Subproject commit 2703863ee9fa02a2443fd2cb2f4d32c67b2982e3 diff --git a/settings.Preview.json b/settings.Preview.json index 96706e3ee5..aaf40b8a4e 100644 --- a/settings.Preview.json +++ b/settings.Preview.json @@ -4,9 +4,6 @@ "identityUri": "/identity", "iconsUri": "https://icons.bitwarden.com", "stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD", - "braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2", - "whitelistDomains": [ - "preview-vault.bitwarden.com" - ] + "braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2" } } diff --git a/settings.Production.json b/settings.Production.json index 52da2d3549..e1b4909f58 100644 --- a/settings.Production.json +++ b/settings.Production.json @@ -4,9 +4,6 @@ "identityUri": "/identity", "iconsUri": "https://icons.bitwarden.com", "stripeKey": "pk_live_bpN0P37nMxrMQkcaHXtAybJk", - "braintreeKey": "production_qfbsv8kc_njj2zjtyngtjmbjd", - "whitelistDomains": [ - "vault.bitwarden.com" - ] + "braintreeKey": "production_qfbsv8kc_njj2zjtyngtjmbjd" } } diff --git a/settings.json b/settings.json index 50e2cd34bc..9029e0ca74 100644 --- a/settings.json +++ b/settings.json @@ -4,9 +4,6 @@ "identityUri": "http://localhost:33656", "iconsUri": "https://icons.bitwarden.com", "stripeKey": "pk_test_KPoCfZXu7mznb9uSCPZ2JpTD", - "braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2", - "whitelistDomains": [ - "localhost" - ] + "braintreeKey": "sandbox_r72q8jq6_9pnxkwm75f87sdc2" } } diff --git a/src/app/config.js b/src/app/config.js index dc4cb2a1d7..6403188443 100644 --- a/src/app/config.js +++ b/src/app/config.js @@ -14,11 +14,11 @@ angular $qProvider.errorOnUnhandledRejections(false); $locationProvider.hashPrefix(''); - if (appSettings.apiUri !== '/api' && appSettings.whitelistDomains && appSettings.whitelistDomains.length) { - jwtOptionsProvider.config({ - whiteListedDomains: appSettings.whitelistDomains - }); - } + // @if false + jwtOptionsProvider.config({ + whiteListedDomains: ['localhost', 'api.bitwarden.com', 'vault.bitwarden.com'] + }); + // @endif var refreshPromise; jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (options, tokenService, authService) { diff --git a/src/app/settings.js b/src/app/settings.js index 505e183734..0fb3be6029 100644 --- a/src/app/settings.js +++ b/src/app/settings.js @@ -1,2 +1,2 @@ angular.module("bit") -.constant("appSettings", {"apiUri":"/api","identityUri":"/identity","iconsUri":"https://icons.bitwarden.com","stripeKey":"pk_live_bpN0P37nMxrMQkcaHXtAybJk","braintreeKey":"production_qfbsv8kc_njj2zjtyngtjmbjd","whitelistDomains":["vault.bitwarden.com"],"selfHosted":false,"version":"1.21.0","environment":"Production"}); +.constant("appSettings", {"apiUri":"/api","identityUri":"/identity","iconsUri":"https://icons.bitwarden.com","stripeKey":"pk_live_bpN0P37nMxrMQkcaHXtAybJk","braintreeKey":"production_qfbsv8kc_njj2zjtyngtjmbjd","selfHosted":false,"version":"1.21.0","environment":"Production"});