๐งช Environment Variable Test
This page verifies that environment variables are loaded correctly and service keys are not exposed to the browser.
โ Server-Side Check (SSR)
{
"supabaseUrl": "https://ugovkenqelkfndtxnepi.supabase.co",
"hasServiceKey": true,
"hasAnonKey": true,
"nodeEnv": "production",
"mockMode": false,
"emailFrom": "Studiekeuzemaken.nl <info@email.studiekeuzemaken.nl>",
"dbQueryWorks": true
} โน๏ธ This data is rendered server-side. Service keys are safe here.
๐ Public Environment (Safe for Browser)
{
"siteUrl": "http://localhost:4321",
"supabaseUrl": "https://ugovkenqelkfndtxnepi.supabase.co",
"port": 4321
} โน๏ธ Only public variables are exposed here. No secrets!
โ๏ธ Client-Side React Island
Browser Supabase Client Test
Loading...
โน๏ธ This React component runs in the browser. It should only have access to public env vars.
๐ Security Verification
- โ
Server can access
SUPABASE_SERVICE_ROLE_KEY - โ
Browser can access
SUPABASE_ANON_KEY - โ Public env vars are available everywhere
- โ Service keys never reach the browser bundle
โ ๏ธ Important: Check the browser console and network tab.
You should NOT see
SERVICE_ROLE_KEY anywhere in client code.
๐ API Test
โ Test API endpoint (/api/test-env)
This API route uses server env and returns safe metadata.