send "habitica-web" as x-client header

This commit is contained in:
Phillip Thelen
2015-11-04 16:26:50 +01:00
parent 6ed3ba36ae
commit e13c008076
2 changed files with 4 additions and 0 deletions

View File

@@ -9,6 +9,8 @@ angular.module('habitrpg')
function($scope, $rootScope, User, $http, $location, $window, ApiUrl, $modal, Analytics) { function($scope, $rootScope, User, $http, $location, $window, ApiUrl, $modal, Analytics) {
$scope.Analytics = Analytics; $scope.Analytics = Analytics;
$http.defaults.headers.common['x-client'] = "habitica-web";
$scope.logout = function() { $scope.logout = function() {
localStorage.clear(); localStorage.clear();
window.location.href = '/logout'; window.location.href = '/logout';

View File

@@ -36,6 +36,8 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
$rootScope.toJson = angular.toJson; $rootScope.toJson = angular.toJson;
$rootScope.Payments = Payments; $rootScope.Payments = Payments;
$http.defaults.headers.common['x-client'] = "habitica-web";
// Angular UI Router // Angular UI Router
$rootScope.$state = $state; $rootScope.$state = $state;
$rootScope.$stateParams = $stateParams; $rootScope.$stateParams = $stateParams;