1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

send device type header

This commit is contained in:
Kyle Spearrin
2017-12-18 13:37:06 -05:00
parent f54884eb79
commit 8d6a96074d
5 changed files with 68 additions and 3 deletions

View File

@@ -1,9 +1,13 @@
angular
.module('bit')
.factory('apiInterceptor', function ($injector, $q, toastr) {
.factory('apiInterceptor', function ($injector, $q, toastr, appSettings, utilsService) {
return {
request: function (config) {
if (config.url.indexOf(appSettings.apiUri + '/') > -1) {
config.headers['Device-Type'] = utilsService.getDeviceType();
}
return config;
},
response: function (response) {