fix: use the multitenant gateway for the REST API - #9
Open
andinux wants to merge 1 commit into
Open
Conversation
The HTTPS server moved off the per-node address onto the multitenant gateway at <project-id>.<hosted-zone>.gateway.sqlite.cloud, so the REST API no longer answers on the host the connection string points to. access-tokens-and-social-login was deriving its REST base URL from the connection string hostname, which sent /v2/tokens, /v2/tokens/details and /v2/weblite/sql to the node. It now reads an explicit SQLITECLOUD_GATEWAY_URL, keeping the connection string for the node. useDocsSearch documented its search URL on the node host and the old node HTTPS port 8090; the gateway answers on 443. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01259fQ5Dg5Ax68zHLrje6QA
damlayildiz
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
The HTTPS server moved off the per-node address (
<project-id>.<hosted-zone>.sqlite.cloud) onto the multitenant gateway (<project-id>.<hosted-zone>.gateway.sqlite.cloud). The dashboard's Weblite and Edge Functions pages already point there. Companion to sqlitecloud/docs#148.access-tokens-and-social-login— was broken at runtimesrc/index.tsderived the REST base URL from the hostname in the connection string:The connection string legitimately points at the node on 8860, so
/v2/tokens,/v2/tokens/detailsand/v2/weblite/sqlwere all being sent to the node's HTTPS server. Against a migrated project this example does not work.It now reads an explicit
SQLITECLOUD_GATEWAY_URL, with the same "not set" guard as the other required variables, and keeps the connection string for the API key and the node connection. An explicit variable was chosen over deriving the gateway host from the connection string so the example does not hard-code the host naming convention..env.examplegains the new variable, and the README's setup steps mention copying the gateway base URL from the Weblite panel.react-components/useDocsSearchThe README's example
searchUrlused the node host and the old node HTTPS port:8090; the gateway answers on 443. README-only — the hook takessearchUrlas a parameter with no baked-in default.Not changed
object-storage-interface/README.mdusessqlitecloud://{HOST}.sqlite.cloud:8860/...— a node connection string, correctly unaffected by this move.Verification
npx tsc --noEmitpasses onaccess-tokens-and-social-login. The example was not run end to end: that needs a live project and Google OAuth credentials.🤖 Generated with Claude Code
https://claude.ai/code/session_01259fQ5Dg5Ax68zHLrje6QA