mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-30 14:53:01 +00:00
This commit is contained in:
@@ -50,7 +50,7 @@ def oauth_required(f):
|
||||
def inner(*args, **kwargs):
|
||||
if config.config_login_type == constants.LOGIN_OAUTH:
|
||||
return f(*args, **kwargs)
|
||||
if request.is_xhr:
|
||||
if request.headers.get('X-Requested-With') == 'XMLHttpRequest':
|
||||
data = {'status': 'error', 'message': 'Not Found'}
|
||||
response = make_response(json.dumps(data, ensure_ascii=False))
|
||||
response.headers["Content-Type"] = "application/json; charset=utf-8"
|
||||
|
||||
Reference in New Issue
Block a user