Describe the bug
Cloudflare Workers cannot tunnel WebSocket connections using a standard fetch() forward. When a client sends Upgrade: websocket, the Worker silently drops the upgrade. Supabase Realtime appears to connect but never receives any events.
Steps to reproduce
- Set up JioBase proxy
- Use Supabase Realtime (
supabase.channel(...).subscribe()) via the proxy URL
- Observe: connection appears established but no events are received
Expected behavior
WebSocket connections should be properly tunnelled to Supabase.
Suggested fix
if (request.headers.get('Upgrade') === 'websocket') {
const [client, worker] = Object.values(new WebSocketPair());
// pair with upstream WebSocket
}
Environment
- apps/proxy/src/index.ts
- Supabase Realtime / WebSocket
Describe the bug
Cloudflare Workers cannot tunnel WebSocket connections using a standard
fetch()forward. When a client sendsUpgrade: websocket, the Worker silently drops the upgrade. Supabase Realtime appears to connect but never receives any events.Steps to reproduce
supabase.channel(...).subscribe()) via the proxy URLExpected behavior
WebSocket connections should be properly tunnelled to Supabase.
Suggested fix
Environment