blob: f3a234e8bb123dafd9409683094d5ef635630b65 [file] [log] [blame]
(function() {
'use strict';
console.log('SetCSRFToken');
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;
}
};
}
})();