⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@fabianlindfors
Copy link

@fabianlindfors fabianlindfors commented Jan 12, 2026

In browser contexts, ShapeStream now accepts relative URLs (e.g., /v1/shape) which are resolved against window.location.origin. This simplifies usage when the proxy is hosted on the same origin as the web application (like would be common with Next.js). In non-browser context, the behaviour remains the same with the constructor throwing an error for relative URLs.

Issue: #3693
Discord: https://discord.com/channels/933657521581858818/1065311523112763392/1460212637739778120

In browser contexts, ShapeStream now accepts relative URLs (e.g., `/v1/shape`)
which are resolved against `window.location.origin`. This simplifies usage
when the Electric server is hosted on the same origin as the web application.

In non-browser environments, relative URLs throw a clear error explaining
that an absolute URL is required.
@fabianlindfors fabianlindfors changed the title feat(typescript-client): Support relative URLs in browser environments Typescript client: Support relative URLs in browser environments Jan 12, 2026
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