Skip to content

Conversation

@kvinwang
Copy link
Collaborator

Summary

  • Normalize source_url in the Onboard RPC handler by auto-appending /prpc when missing
  • Matches the existing pattern in dstack-util (main.rs) and system_setup.rs
  • Allows callers to pass just the base URL (e.g. https://kms.example.com:9201) without knowing the internal /prpc path prefix

Context

Currently source_url is passed verbatim to RaClient::new(), which constructs URLs as {source_url}/{method}?json. Without the /prpc suffix, requests hit the wrong path and get 404s.

The web UI (onboard.html) works around this by appending /prpc in JavaScript, but direct API callers (e.g. curl) must know to include it.

Same fix already merged into Phala-Network/dstack-cloud master.

Test plan

  • cargo fmt --check passes
  • cargo clippy -D warnings passes
  • Onboard with source_url = "https://host:9201/prpc" still works (no double /prpc)
  • Onboard with source_url = "https://host:9201" now works (auto-appended)
  • Onboard with source_url = "https://host:9201/" now works (trailing slash trimmed)

The onboard RPC handler now normalizes source_url by appending /prpc
when it's not already present, matching the behavior of dstack-util.
This allows callers to pass just the base URL (e.g.
https://kms.example.com:9201) without needing to know the /prpc suffix.
@kvinwang kvinwang force-pushed the fix/onboard-source-url-normalize branch from d8bfe8a to e1f34b3 Compare February 13, 2026 05:46
@kvinwang kvinwang enabled auto-merge February 13, 2026 05:49
@kvinwang kvinwang merged commit adad69b into Dstack-TEE:master Feb 13, 2026
4 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