Datatables Ajax Reload Set Cookies
Datatables Ajax Reload Set Cookies
I am using DataTables with an ajax source.
var table = $('#myTable').DatatTable({ ajax: { url: myInitialUrl }....});
The first api call loads fine, setting the authentication cookie properly (cookie would have been already on the browser at the point of showing this page).
At some point I am going to update the Url in order to update the search parameters.
table.ajax.url(myUpdatedUrl).load();
The api call that is happening at this point lacks the authentication cookie, and will subsequently result in an 401 error.
Is there a way to fix this behaviour?
Answers
How are you currently setting the auth cookie? The ajax call will normally just include it automatically (unless it has timed out). Can you link to a page showing the issue please?
Allan