mirror of
https://gitlab.com/octospacc/TelegramIndex-Fork.git
synced 2025-06-05 22:09:12 +02:00
fix TypeError in middleware
This commit is contained in:
@@ -12,7 +12,10 @@ log = logging.getLogger(__name__)
|
|||||||
def _do_basic_auth_check(request):
|
def _do_basic_auth_check(request):
|
||||||
auth_header = request.headers.get(hdrs.AUTHORIZATION)
|
auth_header = request.headers.get(hdrs.AUTHORIZATION)
|
||||||
if not auth_header:
|
if not auth_header:
|
||||||
if "download_" in request.match_info.route.name:
|
if (
|
||||||
|
request.match_info is not None
|
||||||
|
and "download_" in request.match_info.route.name
|
||||||
|
):
|
||||||
return Response(
|
return Response(
|
||||||
body=b"",
|
body=b"",
|
||||||
status=401,
|
status=401,
|
||||||
|
Reference in New Issue
Block a user