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