Merge remote-tracking branch 'origin/maintenance' into maintenance

This commit is contained in:
Gina Häußge committed 2020-10-01 15:53:29 +02:00
commit 3b19d4b6fb
1 file changed
+7
+7
View File
@@ -274,6 +274,13 @@ def get_api_key(request):
if "X-Api-Key" in request.headers:
return request.headers.get("X-Api-Key")
# Check Tornado and Flask headers
if "Authorization" in request.headers:
header = request.headers.get("Authorization")
if header.startswith("Bearer "):
token = header.replace("Bearer ", "", 1)
return token
return None