How to use Cloudflare Workers with Supabase (Postgres) web hook

I have a Supabase project which posts inserts and updates using webhooks to a Cloudflare Worker. Supabase does not wait for the webhook to be acknowledged which means that the Worker thinks that the client aka Supabase has disconnected.

I want the Worker to continue executing even after Supabase has disconnected. Is this possible? If so, how?

Thank you in advance.

waitUntil seems to do the trick.

As soon as the worker receives the web hook, it calls the underlying handler code using a waitUntil, then replies with http 202. Will monitor for a bit to understand if there are any situations in which this doesn’t work.