From 011ba3af84bc21f290ce5daa764a3ff2d2b8a48c Mon Sep 17 00:00:00 2001 From: thorwebdev Date: Wed, 30 Nov 2022 11:53:21 +0800 Subject: [PATCH] chore: final touch --- .../supabase/functions/og-image-with-storage-cdn/handler.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/edge-functions/supabase/functions/og-image-with-storage-cdn/handler.tsx b/examples/edge-functions/supabase/functions/og-image-with-storage-cdn/handler.tsx index a775f49bd52..995487d373c 100644 --- a/examples/edge-functions/supabase/functions/og-image-with-storage-cdn/handler.tsx +++ b/examples/edge-functions/supabase/functions/og-image-with-storage-cdn/handler.tsx @@ -28,7 +28,7 @@ export async function handler(req: Request) { try { // Try to get image from Supabase Storage CDN. - const storageResponse = await fetch(`${STORAGE_URL}/tickets/${username}.png?version=dev`) // TODO change for prod. + const storageResponse = await fetch(`${STORAGE_URL}/tickets/${username}.png?v=3`) if (storageResponse.ok) return storageResponse // Else, generate image ad upload to storage. @@ -207,7 +207,7 @@ export async function handler(req: Request) { const { error } = await supabaseAdminClient.storage .from('images') .upload(`lw6/tickets/${username}.png`, generatedImage.body!, { - // cacheControl: '31536000', // TODO add for prod + cacheControl: '31536000', upsert: false, }) if (error) throw error