mirror of
https://github.com/bitwarden/web
synced 2025-12-16 08:13:22 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94bfcb2865 | ||
|
|
1bb6244337 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bitwarden",
|
"name": "bitwarden",
|
||||||
"version": "1.17.3",
|
"version": "1.18.0",
|
||||||
"env": "Production",
|
"env": "Production",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"connect": "3.6.3",
|
"connect": "3.6.3",
|
||||||
|
|||||||
@@ -13,19 +13,20 @@ angular
|
|||||||
$locationProvider.hashPrefix('');
|
$locationProvider.hashPrefix('');
|
||||||
|
|
||||||
var jwtConfig = {
|
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
|
whiteListedDomains: appSettings.whitelistDomains
|
||||||
};
|
};
|
||||||
|
|
||||||
// Safari doesn't work with unconventional "Content-Language" header for CORS.
|
if (!appSettings.selfHosted) {
|
||||||
// See notes here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
|
var userAgent = navigator.userAgent.toLowerCase();
|
||||||
var userAgent = navigator.userAgent.toLowerCase();
|
if (userAgent.indexOf('safari') > -1 && userAgent.indexOf('chrome') === -1) {
|
||||||
if (userAgent.indexOf('safari') > -1 && userAgent.indexOf('chrome') === -1) {
|
// Safari doesn't work with unconventional "Content-Language" header for CORS.
|
||||||
jwtConfig = {
|
// See notes here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
|
||||||
urlParam: 'access_token',
|
jwtConfig.urlParam = 'access_token';
|
||||||
whiteListedDomains: appSettings.whitelistDomains
|
}
|
||||||
};
|
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);
|
jwtOptionsProvider.config(jwtConfig);
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
angular.module("bit")
|
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