Skip to content

Supabase Realtime WebSocket connections silently fail through proxy #5

Description

@shareefmx

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

  1. Set up JioBase proxy
  2. Use Supabase Realtime (supabase.channel(...).subscribe()) via the proxy URL
  3. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions