SpacetimeDB icon indicating copy to clipboard operation
SpacetimeDB copied to clipboard

Remove trailing `/` from server URIs

Open bfops opened this issue 1 year ago • 0 comments

If a user adds a server with trailing slash, they can get errors e.g.

Error: Unable to retrieve fingerprint for server: https://bitcraft.spacetimedb.org/
Is the server running?
Add a server without retrieving its fingerprint with:
        spacetime server add https://bitcraft.spacetimedb.org/ --no-fingerprint

Caused by:
    HTTP status client error (404 Not Found) for url (https://bitcraft.spacetimedb.org//identity/public-key)

(It ends up putting // in its URLs)

Definition of Done

The following places strip /s from server URIs before adding them and/or trying to use them:

  • [x] CLI
  • [ ] Rust SDK
  • [ ] C# SDK (and Unity SDK)
  • [ ] TypeScript SDK

bfops avatar Jul 26 '24 15:07 bfops