Skip to content

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

lw7: uncomment cache on functions

Francesco Sansalvadorece43c7359dda
diff --git a/apps/www/supabase/functions/lw7-ticket-gallery/handler.tsx b/apps/www/supabase/functions/lw7-ticket-gallery/handler.tsx
index 853372d34f4..4947b1c5c19 100644
--- a/apps/www/supabase/functions/lw7-ticket-gallery/handler.tsx
+++ b/apps/www/supabase/functions/lw7-ticket-gallery/handler.tsx
@@ -185,8 +185,8 @@ export async function handler(req: Request) {
],
headers: {
'content-type': 'image/png',
- // 'cache-control': 'public, max-age=31536000, s-maxage=31536000, no-transform, immutable',
- // 'cdn-cache-control': 'max-age=31536000',
+ 'cache-control': 'public, max-age=31536000, s-maxage=31536000, no-transform, immutable',
+ 'cdn-cache-control': 'max-age=31536000',
},
}
)
@@ -207,7 +207,7 @@ export async function handler(req: Request) {
generatedImage.body!,
{
contentType: 'image/png',
- // cacheControl: '31536000',
+ cacheControl: '31536000',
upsert: true,
}
)
diff --git a/apps/www/supabase/functions/lw7-ticket-og/handler.tsx b/apps/www/supabase/functions/lw7-ticket-og/handler.tsx
index 494a1e6aea1..0991d3333ac 100644
--- a/apps/www/supabase/functions/lw7-ticket-og/handler.tsx
+++ b/apps/www/supabase/functions/lw7-ticket-og/handler.tsx
@@ -69,12 +69,12 @@ export async function handler(req: Request) {
const BACKGROUND = {
REG: {
BG: `${STORAGE_URL}/reg_bg.png`,
- AI: `${STORAGE_URL}/tickets_bg/blurred/regular/png/reg_bg_${bg_image_id}.png`,
+ AI: `${STORAGE_URL}/tickets_bg/blurred/regular/png/reg_bg_${bg_image_id ?? '1'}.png`,
TICKET: `${STORAGE_URL}/reg_ticket.png`,
},
GOLD: {
BG: `${STORAGE_URL}/gold_bg.png`,
- AI: `${STORAGE_URL}/tickets_bg/blurred/golden/png/gold_bg_${bg_image_id}.png`,
+ AI: `${STORAGE_URL}/tickets_bg/blurred/golden/png/gold_bg_${bg_image_id ?? '1'}.png`,
TICKET: `${STORAGE_URL}/gold_ticket.png`,
},
}
@@ -238,8 +238,8 @@ export async function handler(req: Request) {
],
headers: {
'content-type': 'image/png',
- // 'cache-control': 'public, max-age=31536000, s-maxage=31536000, no-transform, immutable',
- // 'cdn-cache-control': 'max-age=31536000',
+ 'cache-control': 'public, max-age=31536000, s-maxage=31536000, no-transform, immutable',
+ 'cdn-cache-control': 'max-age=31536000',
},
}
)
@@ -252,7 +252,7 @@ export async function handler(req: Request) {
generatedImage.body!,
{
contentType: 'image/png',
- // cacheControl: '31536000',
+ cacheControl: '31536000',
upsert: false,
}
)