๐Ÿงช 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.