mirror of
https://github.com/bitwarden/web
synced 2025-12-11 13:53:17 +00:00
only intercept with headers when api is at start
This commit is contained in:
@@ -4,7 +4,7 @@ angular
|
|||||||
.factory('apiInterceptor', function ($injector, $q, toastr, appSettings, utilsService) {
|
.factory('apiInterceptor', function ($injector, $q, toastr, appSettings, utilsService) {
|
||||||
return {
|
return {
|
||||||
request: function (config) {
|
request: function (config) {
|
||||||
if (config.url.indexOf(appSettings.apiUri + '/') > -1) {
|
if (config.url.indexOf(appSettings.apiUri + '/') === 0) {
|
||||||
config.headers['Device-Type'] = utilsService.getDeviceType();
|
config.headers['Device-Type'] = utilsService.getDeviceType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ angular
|
|||||||
|
|
||||||
var refreshPromise;
|
var refreshPromise;
|
||||||
jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (options, tokenService, authService) {
|
jwtInterceptorProvider.tokenGetter = /*@ngInject*/ function (options, tokenService, authService) {
|
||||||
if (options.url.indexOf(appSettings.apiUri + '/') === -1) {
|
if (options.url.indexOf(appSettings.apiUri + '/') !== 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user