Welcome Guest, Not a member yet? Register   Sign In
Refused to get unsafe header "Debugbar-Time"
#1

I'm using the latest version of DataTables and for some reason when I include the "ajax" parameter like this:
PHP Code:
var tableResource = $('#table-resource').DataTable({
        processingtrue,
        serverSidetrue,
        autoWidthfalse,
        order: [
            [1'asc']
        ],
        ajax: {
            url'<?= route_to('admin/blog/resource') ?>',
            method'GET'
        }, 

I get this console error:
PHP Code:
debugbar:74 Refused to get unsafe header "Debugbar-Time" 

in particular on this function:
PHP Code:
function newXHR() {
 var 
realXHR = new oldXHR();
 
realXHR.addEventListener("readystatechange", function() {
 
// Only success responses and URLs that do not contains "debugbar_time" are tracked
 
if (realXHR.readyState === && realXHR.status.toString()[0] === '2' && realXHR.responseURL.indexOf('debugbar_time') === -1) {
 var 
debugbarTime realXHR.getResponseHeader('Debugbar-Time');
 if (
debugbarTime) {
 var 
h2 document.querySelector('#ci-history > h2');
 if(
h2) {
 
h2.innerHTML 'History <small>You have new debug data.</small> <button onclick="loadDoc(' debugbarTime ')">Update</button>';
 var 
badge document.querySelector('a[data-tab="ci-history"] > span > .badge');
 
badge.className += ' active';
 }
 }
 }
 }, 
false);
 return 
realXHR;
}

I suppose there is a conflict with CI4 with ajax request or am I doing something wrong
Reply




Theme © iAndrew 2016 - Forum software by © MyBB