Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle libsql:// scheme in SQLite runtime config #1635

Closed
itowlson opened this issue Jul 6, 2023 · 0 comments · Fixed by #1636
Closed

Handle libsql:// scheme in SQLite runtime config #1635

itowlson opened this issue Jul 6, 2023 · 0 comments · Fixed by #1636

Comments

@itowlson
Copy link
Contributor

itowlson commented Jul 6, 2023

Some libSQL documentation shows connections being set up using the libsql URL scheme. For example, someone reading the Turso docs could easily come across their Spin tutorial and think, "aha, that's how I should set up my runtime config."

image

However, the HTTP client that Spin uses rejects this prefix (or did when I used it, though we have revved since), and expects only a host name. If a user provides a libsql:// URL in their runtime config, Spin will error on it.

The draft docs do warn people to specify only the host name. However, we should consider being more forgiving in Spin, and automatically stripping the libsql:// prefix if present.

A potential risk is if we later do have a reason to support the libsql:// scheme and need a way to disambiguate the protocols.

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 a pull request may close this issue.

1 participant