include credentials in ajax-call
This commit is contained in:
parent
040abcab08
commit
f99c8b3b86
@ -23,8 +23,8 @@
|
||||
event.preventDefault();
|
||||
var url = new URL(window.location.origin + window.location.pathname + this.getAttribute('href'));
|
||||
var order = this.parentNode.dataset.order || ASC;
|
||||
// TODO: not working here... getting whole page as response...
|
||||
url.searchParams.set('table-only', 'true');
|
||||
// TODO: make use of dbtIdent instead of -terms-
|
||||
url.searchParams.set('terms-table-only', 'true');
|
||||
updateTableFrom(url);
|
||||
markSorted(this.parentNode, order);
|
||||
}
|
||||
@ -40,6 +40,7 @@
|
||||
// fetches new sorted table from url with params and replaces contents of current table
|
||||
function updateTableFrom(url) {
|
||||
fetch(url, {
|
||||
credentials: 'same-origin',
|
||||
headers: {
|
||||
'Accept': 'text/html'
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user