The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(www): use service role key for LWX edge function storage uploads (#46411)
Pamela Chia43bacd2f7095
diff --git a/apps/www/supabase/functions/lwx-og/handler.tsx b/apps/www/supabase/functions/lwx-og/handler.tsxindex bd34330ff3e..381ab318d82 100644--- a/apps/www/supabase/functions/lwx-og/handler.tsx+++ b/apps/www/supabase/functions/lwx-og/handler.tsx@@ -1,5 +1,5 @@-import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'import { ImageResponse } from 'https://deno.land/x/[email protected]/mod.ts'+import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'import { createClient } from 'jsr:@supabase/supabase-js@2'const corsHeaders = {@@ -53,7 +53,7 @@ export async function handler(req: Request) {// Supabase API URL - env var exported by default when deployed.Deno.env.get('MISC_USE_URL') ?? '',// Supabase API SERVICE ROLE KEY - env var exported by default when deployed.- Deno.env.get('MISC_USE_ANON_KEY') ?? ''+ Deno.env.get('MISC_USE_SERVICE_ROLE_KEY') ?? '')// Track social sharesdiff --git a/apps/www/supabase/functions/lwx-ticket-og/handler.tsx b/apps/www/supabase/functions/lwx-ticket-og/handler.tsxindex 3dbfce0e051..7681eaaf835 100644--- a/apps/www/supabase/functions/lwx-ticket-og/handler.tsx+++ b/apps/www/supabase/functions/lwx-ticket-og/handler.tsx@@ -1,5 +1,5 @@-import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'import { ImageResponse } from 'https://deno.land/x/[email protected]/mod.ts'+import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'import { createClient } from 'jsr:@supabase/supabase-js@2'const corsHeaders = {@@ -77,7 +77,7 @@ export async function handler(req: Request) {// Supabase API URL - env var exported by default when deployed.Deno.env.get('MISC_USE_URL') ?? '',// Supabase API SERVICE ROLE KEY - env var exported by default when deployed.- Deno.env.get('MISC_USE_ANON_KEY') ?? ''+ Deno.env.get('MISC_USE_SERVICE_ROLE_KEY') ?? '')// return geneartedOGImagediff --git a/apps/www/supabase/functions/lwx-ticket/handler.tsx b/apps/www/supabase/functions/lwx-ticket/handler.tsxindex 004c4967d47..dc8ca4977f7 100644--- a/apps/www/supabase/functions/lwx-ticket/handler.tsx+++ b/apps/www/supabase/functions/lwx-ticket/handler.tsx@@ -1,5 +1,5 @@-import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'import { ImageResponse } from 'https://deno.land/x/[email protected]/mod.ts'+import React from 'https://esm.sh/[email protected]?deno-std=0.140.0'import { createClient } from 'jsr:@supabase/supabase-js@2'const corsHeaders = {@@ -49,7 +49,7 @@ export async function handler(req: Request) {// Supabase API URL - env var exported by default when deployed.Deno.env.get('MISC_USE_URL') ?? '',// Supabase API SERVICE ROLE KEY - env var exported by default when deployed.- Deno.env.get('MISC_USE_ANON_KEY') ?? ''+ Deno.env.get('MISC_USE_SERVICE_ROLE_KEY') ?? '')// Track social shares