Merge pull request #4583 from supabase/master

Prod deploy
This commit is contained in:
Inian authored and GitHub committed 2021-12-20 17:56:27 +05:30
commit ee77a6d4b2
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -78,7 +78,7 @@ const DocView: FC<any> = observer(({}) => {
const swaggerUrl = data?.autoApiService?.restUrl
const headers: any = { apikey: API_KEY }
if (API_KEY?.length > 40) headers['authorization'] = `Bearer ${API_KEY}`
if (API_KEY?.length > 40) headers['Authorization'] = `Bearer ${API_KEY}`
const { data: jsonSchema, error: jsonSchemaError } = useSWR(
() => swaggerUrl,
+3 -1
View File
@@ -116,6 +116,7 @@ export default class MetaStore implements IMetaStore {
connectionString?: string
baseUrl: string
queryBaseUrl: string
excludedSchemas = [
'auth',
'extensions',
@@ -132,6 +133,7 @@ export default class MetaStore implements IMetaStore {
const { projectRef, connectionString } = options
this.rootStore = rootStore
this.baseUrl = `/api/pg-meta/${projectRef}`
this.queryBaseUrl = `${API_URL}/pg-meta/${projectRef}`
const headers: any = {}
if (IS_PLATFORM && connectionString) {
@@ -166,7 +168,7 @@ export default class MetaStore implements IMetaStore {
try {
const headers: any = { 'Content-Type': 'application/json' }
if (this.connectionString) headers['x-connection-encrypted'] = this.connectionString
const url = `${this.baseUrl}/query`
const url = `${this.queryBaseUrl}/query`
const response = await post(url, { query: value }, { headers })
if (response.error) throw response.error