mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-18 02:41:15 +02:00
only intercept with headers when api is at start
This commit is contained in:
parent
10f41bf288
commit
aaa21daa29
@ -4,7 +4,7 @@ angular
|
||||
.factory('apiInterceptor', function ($injector, $q, toastr, appSettings, utilsService) {
|
||||
return {
|
||||
request: function (config) {
|
||||
if (config.url.indexOf(appSettings.apiUri + '/') > -1) {
|
||||
if (config.url.indexOf(appSettings.apiUri + '/') === 0) {
|
||||
config.headers['Device-Type'] = utilsService.getDeviceType();
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ angular
|
||||
|
||||
var refreshPromise;
|
||||
jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (options, tokenService, authService) {
|
||||
if (options.url.indexOf(appSettings.apiUri + '/') === -1) {
|
||||
if (options.url.indexOf(appSettings.apiUri + '/') !== 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user