mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-18 22:20:30 +00:00
Update epub.js
send the CSRF token when adding bookmarks
This commit is contained in:
parent
87e526642c
commit
3f91313303
@ -62,10 +62,13 @@ var reader;
|
|||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var csrftoken = $("input[name='csrf_token']").val();
|
||||||
|
|
||||||
// Save to database
|
// Save to database
|
||||||
$.ajax(calibre.bookmarkUrl, {
|
$.ajax(calibre.bookmarkUrl, {
|
||||||
method: "post",
|
method: "post",
|
||||||
data: { bookmark: location || "" }
|
data: { bookmark: location || "" },
|
||||||
|
headers: { "X-CSRFToken": csrftoken }
|
||||||
}).fail(function (xhr, status, error) {
|
}).fail(function (xhr, status, error) {
|
||||||
alert(error);
|
alert(error);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user