blob: 025813c941150e168dfd36c02ab9f6cb24b5f24f [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;
}
};
}
})();