mirror of
https://github.com/bitwarden/web
synced 2025-12-15 15:53:18 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94bfcb2865 | ||
|
|
1bb6244337 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bitwarden",
|
||||
"version": "1.17.3",
|
||||
"version": "1.18.0",
|
||||
"env": "Production",
|
||||
"devDependencies": {
|
||||
"connect": "3.6.3",
|
||||
|
||||
@@ -13,19 +13,20 @@ angular
|
||||
$locationProvider.hashPrefix('');
|
||||
|
||||
var jwtConfig = {
|
||||
// Using Content-Language header since it is unused and is a CORS-safelisted header. This avoids pre-flights.
|
||||
authHeader: 'Content-Language',
|
||||
whiteListedDomains: appSettings.whitelistDomains
|
||||
};
|
||||
|
||||
// Safari doesn't work with unconventional "Content-Language" header for CORS.
|
||||
// See notes here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
|
||||
if (!appSettings.selfHosted) {
|
||||
var userAgent = navigator.userAgent.toLowerCase();
|
||||
if (userAgent.indexOf('safari') > -1 && userAgent.indexOf('chrome') === -1) {
|
||||
jwtConfig = {
|
||||
urlParam: 'access_token',
|
||||
whiteListedDomains: appSettings.whitelistDomains
|
||||
};
|
||||
// Safari doesn't work with unconventional "Content-Language" header for CORS.
|
||||
// See notes here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
|
||||
jwtConfig.urlParam = 'access_token';
|
||||
}
|
||||
else {
|
||||
// Using Content-Language header since it is unused and is a CORS-safelisted header. This avoids pre-flights.
|
||||
jwtConfig.authHeader = 'Content-Language';
|
||||
}
|
||||
}
|
||||
|
||||
jwtOptionsProvider.config(jwtConfig);
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
angular.module("bit")
|
||||
.constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","stripeKey":"pk_live_bpN0P37nMxrMQkcaHXtAybJk","braintreeKey":"production_qfbsv8kc_njj2zjtyngtjmbjd","whitelistDomains":["api.bitwarden.com"],"selfHosted":false,"version":"1.17.3","environment":"Production"});
|
||||
.constant("appSettings", {"apiUri":"https://api.bitwarden.com","identityUri":"https://identity.bitwarden.com","stripeKey":"pk_live_bpN0P37nMxrMQkcaHXtAybJk","braintreeKey":"production_qfbsv8kc_njj2zjtyngtjmbjd","whitelistDomains":["api.bitwarden.com"],"selfHosted":false,"version":"1.18.0","environment":"Production"});
|
||||
|
||||
Reference in New Issue
Block a user