I'm sending token headers under eventSources option for "full calender" with below headers option in Angular:
eventSources: [
{
url: '/api/schedules',
headers: JSON.parse($cookies['auth_headers']),
error: function () {
var $state = $injector.get('$state');
$state.transitionTo('page.login');
}
}
],
Given fullcalendar uses jQuery, I need to have headers refreshed for every request. Is there a way to do this with fullcalendar?
Untested, but specifying a
beforeSend
function should make this possible: