mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-01 07:36:20 +00:00
Changed response code to opds download forbidden to 401 instead of 404
This commit is contained in:
parent
c40c8a2255
commit
cb073daca3
@ -424,11 +424,8 @@ def feed_shelf(book_id):
|
|||||||
@requires_basic_auth_if_no_ano
|
@requires_basic_auth_if_no_ano
|
||||||
def opds_download_link(book_id, book_format):
|
def opds_download_link(book_id, book_format):
|
||||||
if not auth.current_user().role_download():
|
if not auth.current_user().role_download():
|
||||||
return abort(403)
|
return abort(401)
|
||||||
if "Kobo" in request.headers.get('User-Agent'):
|
client = "kobo" if "Kobo" in request.headers.get('User-Agent') else ""
|
||||||
client = "kobo"
|
|
||||||
else:
|
|
||||||
client = ""
|
|
||||||
return get_download_link(book_id, book_format.lower(), client)
|
return get_download_link(book_id, book_format.lower(), client)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user