Spaces:
Sleeping
Sleeping
OpenClaw commited on
Commit Β·
5d45afc
1
Parent(s): 96cb238
More auth debug
Browse files
app.py
CHANGED
|
@@ -44,7 +44,10 @@ def auth(req: Request):
|
|
| 44 |
# DEBUG
|
| 45 |
print(f"[AUTH] client_key={auth_header[:15]}..., MASTER={MASTER_API_KEY[:15]}..., API_KEYS_COUNT={len(API_KEYS)}")
|
| 46 |
# Accept if: (1) it's a valid backend key OR (2) it's master key
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
| 48 |
raise HTTPException(401, "Unauthorized")
|
| 49 |
|
| 50 |
# βββββββββββββββββββββββββββββ
|
|
|
|
| 44 |
# DEBUG
|
| 45 |
print(f"[AUTH] client_key={auth_header[:15]}..., MASTER={MASTER_API_KEY[:15]}..., API_KEYS_COUNT={len(API_KEYS)}")
|
| 46 |
# Accept if: (1) it's a valid backend key OR (2) it's master key
|
| 47 |
+
in_keys = auth_header in API_KEYS
|
| 48 |
+
in_master = auth_header == MASTER_API_KEY
|
| 49 |
+
print(f"[AUTH] header={auth_header[:8]}..., in_keys={in_keys}, in_master={in_master}")
|
| 50 |
+
if not in_keys and not in_master:
|
| 51 |
raise HTTPException(401, "Unauthorized")
|
| 52 |
|
| 53 |
# βββββββββββββββββββββββββββββ
|