Having trouble figuring out how to read headers in an edge function request
Has anyone had this happen to them? I'm creating an edge function, and to make sure it only gets called from a cron job, I added a "x-supabase-webhook-source" header (using the "custom source header" option). The header shows up when I test locally, but when I deploy the edge function, the function can no longer see the header. Should I be looking for request headers somewhere other than
req.headers?

3 Replies
Hosted seems to work for me:


The TEST tool in dashboard seems tricky on the headers. You have to click + add a header after you have added the header.
Damn, that really was it
I'm still getting a 401 error when the cron job runs, but it might be something else, I'll do some debugging