server/core/js/oc-requesttoken.js
Lukas Reschke 8c2aeb9b21 Add OCS API header per default
Relieve @PVince from having to write it all the time ;-)
2014-11-21 19:54:19 +01:00

4 lines
156 B
JavaScript

$(document).on('ajaxSend',function(elm, xhr) {
xhr.setRequestHeader('requesttoken', oc_requesttoken);
xhr.setRequestHeader('OCS-APIREQUEST', 'true');
});