Update epub.js
send the CSRF token when adding bookmarks
This commit is contained in:
parent
87e526642c
commit
3f91313303
1 changed files with 4 additions and 1 deletions
|
@ -61,11 +61,14 @@ var reader;
|
|||
this.removeBookmark(bookmark);
|
||||
}.bind(this));
|
||||
}
|
||||
|
||||
var csrftoken = $("input[name='csrf_token']").val();
|
||||
|
||||
// Save to database
|
||||
$.ajax(calibre.bookmarkUrl, {
|
||||
method: "post",
|
||||
data: { bookmark: location || "" }
|
||||
data: { bookmark: location || "" },
|
||||
headers: { "X-CSRFToken": csrftoken }
|
||||
}).fail(function (xhr, status, error) {
|
||||
alert(error);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue