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

fix: allow overriding urls #399

Closed
wants to merge 1 commit into from
Closed

Conversation

DavraYoung
Copy link

What kind of change does this PR introduce?

This PR allows developers to control services urls, in case if they use Supabase behind the proxy.

What is the current behavior?

Current behavior appends /rest/v1, /realtime/v1, etc. paths to the url, which sometimes is not desired, and there is not option to easily disable this behavior.

What is the new behavior?

New behavior by default works as old one, but if user specifies overrideUrls option, he will be able to change "/*/v1" url append logic

@marcinkoziej
Copy link

@DavraYoung have you tested this? You check if option is null, but when unset, it looks like it will be undefined. hence, when none of these options are given, the urls will be set to undefined..

this.realtimeUrl = `${_supabaseUrl}/realtime/v1`.replace('http', 'ws')
this.authUrl = `${_supabaseUrl}/auth/v1`
this.storageUrl = `${_supabaseUrl}/storage/v1`
this.restUrl =
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be better if you use "logical or" operator here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soedirgo
Copy link
Member

Closed as per #443 (comment).

@soedirgo soedirgo closed this Sep 28, 2022
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.

4 participants