OpenClaw commited on
Commit
5d45afc
Β·
1 Parent(s): 96cb238

More auth debug

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- if auth_header not in API_KEYS and auth_header != MASTER_API_KEY:
 
 
 
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
  # ─────────────────────────────