fix(ops): send apikey with push drain, read the web push public key from release/, record 2026-11-17 backlog evidence
The scheduled push drain got HTTP 401 because modern Supabase service keys need the apikey header next to Bearer. NAS deploy scripts fall back to release/webpush-vapid-public.key (public key only). Map, mobile SSOT and deployment runbooks are synced with the verified operations run in docs/evidence/2026-11-17-backlog-operations.md.
This commit is contained in:
parent
8d8aaf5794
commit
6791e29f27
16 changed files with 254 additions and 96 deletions
|
|
@ -44,6 +44,7 @@ Deno.test('drain posts to the drain endpoint with the service role bearer', asyn
|
|||
assert(calls[0].url === 'https://example.supabase.co/functions/v1/send-push?mode=drain&limit=20', 'drain url')
|
||||
const headers = calls[0].init.headers as Record<string, string>
|
||||
assert(headers.Authorization === `Bearer ${env.SUPABASE_SERVICE_ROLE_KEY}`, 'service role bearer')
|
||||
assert(headers.apikey === env.SUPABASE_SERVICE_ROLE_KEY, 'modern service role apikey')
|
||||
assert(headers['Content-Type'] === 'application/json', 'json content type')
|
||||
assert(calls[0].init.body === '{}', 'empty json body')
|
||||
assert(calls[0].init.method === 'POST', 'post method')
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ export async function drainPushDispatches(
|
|||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: `Bearer ${serviceRoleKey}`,
|
||||
apikey: serviceRoleKey,
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: '{}',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue