Skip to content

Point the CLI's default relay at the API origin - #34

Merged
op-q merged 1 commit into
mainfrom
fix/cli-default-relay-origin
Aug 20, 2026
Merged

Point the CLI's default relay at the API origin#34
op-q merged 1 commit into
mainfrom
fix/cli-default-relay-origin

Conversation

@op-q

@op-q op-q commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Fixes drop send failing against the hosted instance with:

error: the relay rejected the request with status 404

Cause

The relay was healthy the whole time — the CLI was asking the wrong host.

The hosted instance is a split deployment:

Host Serves
drop.lifbom.com browser client and install.sh, as static files
the API origin the Rust relay

The browser client works because its API origin is baked into the bundle at build time via VITE_BACKEND_ORIGIN. The CLI carries its own compiled default, and that default named the static host — so POST /api/session/create reached a static file server and got its 404.

Verified: the relay answers 200 on /health, /ready, and /metrics, and a transfer with --server pointed at the API origin completed byte-identical, both processes exiting 0.

Change

DEFAULT_SERVER now points at api.drop.lifbom.com, with the split recorded in the README and in a new decision entry — a CLI default that differs from the address a person types into a browser reads as a mistake unless it is written down.

The API host is a name we control rather than a provider-generated hostname on purpose. DEFAULT_SERVER is compiled in, so an installed binary cannot be redirected without --server, DROP_SERVER, or a new release. A stable name makes moving the relay a DNS change instead of a re-release.

⚠️ Do not merge before the DNS record exists

This is only correct once api.drop.lifbom.com resolves to the relay. Until then the default points at a name that does not resolve, which is a worse failure than the current 404.

No binaries have been published yet — the release is still blocked by #33 — so there are no installed clients to break, and this is the cheapest moment to change a compiled-in default.

Sequencing: DNS → this PR → #33 → dispatch the release.

Not changed

drop.lifbom.com remains correct for the website link and the install.sh URL, and those references are untouched. The normalize_origin tests keep using it as a generic bare-host example, since they test the https-assumption rule rather than the default.

Verification

scripts/check-secrets.sh, cargo fmt --check, cargo clippy --workspace --all-targets --all-features -D warnings, and cargo test --workspace --all-targets (56 passed) all pass.

🤖 Generated with Claude Code

`drop send` failed against the hosted instance with "the relay rejected the
request with status 404". The relay was healthy; the CLI was asking the wrong
host.

The hosted instance is a split deployment. `drop.lifbom.com` is a static host
serving the browser client and `install.sh`; the relay answers elsewhere. The
browser client works because its API origin is baked in at build time through
`VITE_BACKEND_ORIGIN`, but the CLI carries its own compiled default, and that
default named the static host. `POST /api/session/create` therefore reached a
static file server, which answered 404.

This points `DEFAULT_SERVER` at `api.drop.lifbom.com` and records the split in
the README and in a decision entry, because a CLI default that differs from the
address a person types into a browser reads as a mistake unless it is written
down.

The API host is named rather than provider-generated on purpose: `DEFAULT_SERVER`
is compiled in, so an installed binary cannot be redirected without `--server`,
`DROP_SERVER`, or a new release. A stable name means moving the relay is a DNS
change instead of a re-release.

This must not ship before `api.drop.lifbom.com` resolves to the relay. No
binaries have been published yet, so there are no installed clients to break.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drop Ready Ready Preview Aug 19, 2026 1:24pm

@op-q
op-q merged commit 0eedb4e into main Aug 20, 2026
8 checks passed
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.

1 participant