mirror of
https://github.com/headroomlabs-ai/headroom.git
synced 2026-08-27 14:17:10 -04:00
fix: remove Bearer auth header for Supabase publishable key (telemetry broken since 0.5.5)
Supabase migrated from JWT anon keys to sb_publishable_ keys in 2025. The new keys are not JWTs and cannot be sent as Bearer tokens in the Authorization header. The apikey header alone is sufficient for PostgREST operations. This was silently failing (swallowed exception) since the key migration, causing zero telemetry for all versions > 0.5.5.
This commit is contained in:
parent
80bfb04ddd
commit
854d9f3de5
1 changed files with 2 additions and 1 deletions
|
|
@ -252,7 +252,8 @@ class TelemetryBeacon:
|
|||
json=payload,
|
||||
headers={
|
||||
"apikey": _SUPABASE_KEY,
|
||||
"Authorization": f"Bearer {_SUPABASE_KEY}",
|
||||
# sb_publishable_ keys are not JWTs — don't send as Bearer token
|
||||
# (Supabase migrated from JWT anon keys to publishable keys in 2025)
|
||||
"Content-Type": "application/json",
|
||||
# Upsert: on conflict with session_id, merge (overwrite) the row
|
||||
"Prefer": "resolution=merge-duplicates,return=minimal",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue