1
0
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:
Kyle Spearrin
2018-02-26 23:18:03 -05:00
parent 10f41bf288
commit aaa21daa29
2 changed files with 2 additions and 2 deletions

View File

@@ -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();
} }

View File

@@ -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;
} }