Skip to content

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

fix: platinumSecret image (#34486)

Goszczucbadf927d1d4
diff --git a/apps/www/app/api-v2/ticket-og/route.tsx b/apps/www/app/api-v2/ticket-og/route.tsx
index 54fef782eb5..478376b7179 100644
--- a/apps/www/app/api-v2/ticket-og/route.tsx
+++ b/apps/www/app/api-v2/ticket-og/route.tsx
@@ -147,22 +147,6 @@ export async function GET(req: Request, res: Response) {
// Just here to silence snyk false positives
// Verify that req.url is from an allowed domain
- const allowedDomains = ['supabase.com', '-supabase.vercel.app', 'localhost:3000']
-
- const isAllowedDomain = allowedDomains.some(
- (domain) =>
- url.hostname === domain ||
- (domain.startsWith('-') && url.hostname.endsWith(domain)) ||
- (url.hostname === 'localhost' && url.port === '3000')
- )
-
- if (!isAllowedDomain) {
- return new Response(JSON.stringify({ error: 'Unauthorized domain' }), {
- headers: { ...corsHeaders, 'Content-Type': 'application/json' },
- status: 403,
- })
- }
-
const username = url.searchParams.get('username') ?? url.searchParams.get('amp;username')
const userAgent = req.headers.get('user-agent')
diff --git a/apps/www/pages/launch-week/tickets/[username].tsx b/apps/www/pages/launch-week/tickets/[username].tsx
index 7db017bec70..982ff7149d7 100644
--- a/apps/www/pages/launch-week/tickets/[username].tsx
+++ b/apps/www/pages/launch-week/tickets/[username].tsx
@@ -98,7 +98,13 @@ export const getStaticProps: GetStaticProps = async ({ params }) => {
)
}
- const ticketType = user?.secret ? 'secret' : user?.platinum ? 'platinum' : 'regular'
+ const ticketType = user?.secret
+ ? user?.platinum
+ ? 'platinumSecret'
+ : 'secret'
+ : user?.platinum
+ ? 'platinum'
+ : 'regular'
const ogImageUrl = `${process.env.NEXT_PUBLIC_SUPABASE_URL}/storage/v1/object/public/images/launch-week/lw14/og/${ticketType}/${username}.png?t=${dayjs(new Date()).format('DHHmmss')}`
return {