Update epub.js

send the CSRF token when adding bookmarks
pull/2202/head
Jonathan Fenske 3 years ago committed by GitHub
parent 87e526642c
commit 3f91313303
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save