We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c55237 commit abdf36dCopy full SHA for abdf36d
src/SupabaseClient.ts
@@ -93,14 +93,8 @@ export default class SupabaseClient<
93
this.realtimeUrl = `${_supabaseUrl}/realtime/v1`.replace(/^http/i, 'ws')
94
this.authUrl = `${_supabaseUrl}/auth/v1`
95
this.storageUrl = `${_supabaseUrl}/storage/v1`
96
+ this.functionsUrl = `${_supabaseUrl}/functions/v1`
97
- const isPlatform = _supabaseUrl.match(/(supabase\.co)|(supabase\.in)/)
98
- if (isPlatform) {
99
- const urlParts = _supabaseUrl.split('.')
100
- this.functionsUrl = `${urlParts[0]}.functions.${urlParts[1]}.${urlParts[2]}`
101
- } else {
102
- this.functionsUrl = `${_supabaseUrl}/functions/v1`
103
- }
104
// default storage key uses the supabase project ref as a namespace
105
const defaultStorageKey = `sb-${new URL(this.authUrl).hostname.split('.')[0]}-auth-token`
106
const DEFAULTS = {
0 commit comments