Skip to content

fix(connector-ui): add SESSION_RELAY DO bindings to staging and production envs#65

Merged
JamesLawton merged 1 commit intostagingfrom
fix/wrangler-durable-object-env-bindings
Mar 31, 2026
Merged

fix(connector-ui): add SESSION_RELAY DO bindings to staging and production envs#65
JamesLawton merged 1 commit intostagingfrom
fix/wrangler-durable-object-env-bindings

Conversation

@JamesLawton
Copy link
Copy Markdown
Collaborator

Summary

  • Durable Object bindings are not inherited by environments in wrangler.toml — this caused the SESSION_RELAY binding to be missing from the staging deployment, breaking the relay API
  • Added SESSION_RELAY DO bindings and migrations explicitly to [env.staging] and [env.production]
  • Added run_worker_first = ["/api/*"] and not_found_handling = "single-page-application" to the assets config for cleaner routing

Test plan

  • Deploy to staging and verify /api/relay/request returns JSON (not HTML)
  • Run wallet create against staging and confirm relay session completes successfully

…ction envs

Durable objects are not inherited by environments in wrangler.toml.
Also adds run_worker_first and not_found_handling to assets config.
let active = true;
const poll = async () => {
try {
const res = await fetch(`/api/relay/status/${rid}`);

Check warning

Code scanning / CodeQL

Client-side request forgery Medium

The
URL
of this request depends on a
user-provided value
.
Comment on lines +505 to +509
setConnecting(false);
} catch (e: any) {
console.error(e);
setError(e?.message || String(e));
setConnecting(false);

Check warning

Code scanning / CodeQL

Client-side request forgery Medium

The
URL
of this request depends on a
user-provided value
.
@JamesLawton JamesLawton changed the base branch from main to staging March 31, 2026 09:56
@JamesLawton JamesLawton merged commit e639bf8 into staging Mar 31, 2026
4 checks passed
@JamesLawton JamesLawton deleted the fix/wrangler-durable-object-env-bindings branch March 31, 2026 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants