1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-06-13 17:06:50 +00:00

Merge remote-tracking branch 'bookmark_csrf/master'

This commit is contained in:
Ozzie Isaacs 2021-12-14 17:59:32 +01:00
commit f0399d04b7
2 changed files with 5 additions and 1 deletions

View File

@ -62,10 +62,13 @@ var reader;
}.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);
});

View File

@ -17,6 +17,7 @@
<body>
<div id="sidebar">
<div id="panels">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<!--input id="searchBox" placeholder="search" type="search"-->
<!--a id="show-Search" class="show_view icon-search" data-view="Search">Search</a-->