log l'env API_AUTH_DISABLED
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ MATOMO_BASE_URL=
|
|||||||
MATOMO_TOKEN=
|
MATOMO_TOKEN=
|
||||||
|
|
||||||
# API privée
|
# API privée
|
||||||
DISABLE_API_AUTH="false"
|
API_AUTH_DISABLED="false"
|
||||||
MATOMO_URL=https://analytics.maudry.com/matomo.php
|
MATOMO_URL=https://analytics.maudry.com/matomo.php
|
||||||
MATOMO_SITE_ID=14
|
MATOMO_SITE_ID=14
|
||||||
MATOMO_TRACKING_ENABLED=true
|
MATOMO_TRACKING_ENABLED=true
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ def _abort_401(message: str):
|
|||||||
def require_token(fn):
|
def require_token(fn):
|
||||||
@wraps(fn)
|
@wraps(fn)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
|
print(API_AUTH_DISABLED)
|
||||||
if not API_AUTH_DISABLED:
|
if not API_AUTH_DISABLED:
|
||||||
header = request.headers.get("Authorization", "")
|
header = request.headers.get("Authorization", "")
|
||||||
if not header.startswith("Bearer "):
|
if not header.startswith("Bearer "):
|
||||||
|
|||||||
Reference in New Issue
Block a user