blob: 283e90d28f88061717d69826f17a74c1404e13e5 [file] [log] [blame]
(function() {
'use strict';
angular
.module('xos.helpers')
.factory('SetCSRFToken', setCSRFToken);
function setCSRFToken($cookies) {
return {
request: function(request){
if(request.method !== 'GET'){
request.headers['X-CSRFToken'] = $cookies.get('xoscsrftoken');
}
return request;
}
};
}
})();