1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-10-31 23:26:20 +00:00

Changed response code to opds download forbidden to 401 instead of 404

This commit is contained in:
Ozzie Isaacs 2024-10-19 06:36:03 +02:00
parent c40c8a2255
commit cb073daca3

View File

@ -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)