This commit is contained in:
Martin
2016-08-08 15:21:30 +02:00
parent da96b4c183
commit 46b5f116be
3 changed files with 19 additions and 10 deletions
+2 -1
View File
@@ -2,6 +2,7 @@
import json
from flask import request, current_app, Response
def check_api_key():
api_keys = current_app.config.get("API_KEYS")
if not api_keys:
@@ -13,4 +14,4 @@ def check_api_key():
return Response(
response, 401,
{'WWW-Authenticate': 'Basic realm="Login Required"'}
)
)