cd90685af1
Prevents leaking the CSRF token to another third-party domain by mistake.
6 lines
209 B
JavaScript
6 lines
209 B
JavaScript
$(document).on('ajaxSend',function(elm, xhr, settings) {
|
|
if(settings.crossDomain === false) {
|
|
xhr.setRequestHeader('requesttoken', oc_requesttoken);
|
|
xhr.setRequestHeader('OCS-APIREQUEST', 'true');
|
|
}
|
|
});
|