Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: hard coded api page error

Isaiah Hamilton5d1cb1f1c323
diff --git a/studio/.env b/studio/.env
index 6b71a62226e..09b867e774e 100644
--- a/studio/.env
+++ b/studio/.env
@@ -2,5 +2,6 @@ STUDIO_PG_META_URL=http://localhost:8000/pg
POSTGRES_PASSWORD=your-super-secret-and-long-postgres-password
SUPABASE_URL=http://localhost:8000
+SUPABASE_REST_URL=http://localhost:8000/rest/v1/
SUPABASE_ANON_KEY=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoiYW5vbiIsImlhdCI6MTYyNzIwODU0MCwiZXhwIjoxOTc0MzYzNzQwfQ.zcaQfHd3VA7XgJmdGfmV86OLVJT9s2MTmSy-e69BpUY
SUPABASE_SERVICE_KEY=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlIjoic2VydmljZV9yb2xlIiwiaWF0IjoxNjI3MjA4NTQwLCJleHAiOjE5NzQzNjM3NDB9.pkT3PNpO4DtO45Ac5HK_TKCx8sGLgNtV__pr_ZrRSAU
\ No newline at end of file
diff --git a/studio/pages/api/props/project/[ref]/api.ts b/studio/pages/api/props/project/[ref]/api.ts
index efc2e2efacf..96a9790dd92 100644
--- a/studio/pages/api/props/project/[ref]/api.ts
+++ b/studio/pages/api/props/project/[ref]/api.ts
@@ -41,8 +41,8 @@ const handleGetAll = async (req: NextApiRequest, res: NextApiResponse) => {
endpoint: 'localhost:8000',
realtime_enabled: true,
},
- endpoint: 'http://localhost:8000',
- restUrl: 'http://localhost:8000/rest/v1/',
+ endpoint: process.env.SUPABASE_URL || 'http://localhost:8000',
+ restUrl: process.env.SUPABASE_REST_URL || 'http://localhost:8000/rest/v1/',
defaultApiKey: process.env.SUPABASE_ANON_KEY,
serviceApiKey: process.env.SUPABASE_SERVICE_KEY,
internalApiKey: process.env.SUPABASE_ANON_KEY,