Skip to content

codev-sdk: TowerClientOptions cannot express an https or path-prefixed base URL (cloud tunnel proxy) #1349

Description

@amrmelsayed

Finding (from the #1189 RN/Metro async review of PR #1346)

TowerClientOptions accepts host + port and the constructor hardcodes the scheme and shape: this.baseUrl = \http://${host}:${port}``. Two real deployment shapes cannot be expressed:

  1. The cloud tunnel proxy. Browser (and later mobile) access through Codev Cloud rides https://<cloud-host>/t/<towerId>/...: https scheme, default port, and a path prefix. None of the three fit host+port+hardcoded-http.
  2. Any TLS-terminated or reverse-proxied Tower (same structural problem).

This is Phase-2-blocking for mobile (cloud-connected mode is entirely proxy-based) and already constrains any web use of the sdk through the tunnel today.

Ask

Accept a full base URL as the alternative: baseUrl?: string (mutually exclusive with host/port, which remain the local-default convenience). URL building inside the client must then join paths against a possibly-prefixed base rather than assuming origin-rooted routes. The workspace-scoped route builders deserve a glance at the same time (they concatenate absolute paths today).

No behavior change for existing consumers; host/port keeps working.

Origin

Anticipated by the mobile handoff/auth designs (codev/research/mobile/decisions/q1-pairing-model.md, q2-auth-model.md: handoff URLs are tunnel-proxy paths) and surfaced concretely while reviewing the sdk constructor against those flows.

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

    area/coreArea: shared core library / forge abstraction (packages/core, packages/codev/src/lib)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions