Skip to content

Commit 8de9e51

Browse files
rushgamebase-devclaude
andcommitted
OG: fallback image + Railway API URL for Vercel WAF bypass
Vercel's "Security Checkpoint" (WAF) blocks automated requests to /api/og/* — including Twitter's crawler. Added fallback og:image so cards always show something even when the dynamic image is blocked. User action needed: whitelist /api/og/* in Vercel Dashboard → Settings → Security to enable the dynamic card image. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 5c5e3e4 commit 8de9e51

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

apps/web/app/markets/[address]/layout.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export async function generateMetadata({
6363
const title = `${market.question} | Rush Markets`;
6464
const description = `${yesLabel} ${yesOdds}% vs ${noLabel} ${noOdds}%${pool ? ` · ${pool} pool` : ""}${timer !== "Ended" ? ` · ${timer}` : ""} — Bet now on Rush`;
6565
const ogImageUrl = `${SITE_URL}/api/og/${address}`;
66+
const ogFallback = `${SITE_URL}/og-fallback.png`;
6667
const marketUrl = `${SITE_URL}/markets/${address}`;
6768

6869
return {
@@ -73,14 +74,17 @@ export async function generateMetadata({
7374
description,
7475
url: marketUrl,
7576
siteName: "Rush Markets",
76-
images: [{ url: ogImageUrl, width: 1200, height: 630, alt: market.question }],
77+
images: [
78+
{ url: ogImageUrl, width: 1200, height: 630, alt: market.question },
79+
{ url: ogFallback, width: 1200, height: 630, alt: "Rush Markets" },
80+
],
7781
type: "website",
7882
},
7983
twitter: {
8084
card: "summary_large_image",
8185
title: market.question,
8286
description,
83-
images: [ogImageUrl],
87+
images: [ogImageUrl, ogFallback],
8488
},
8589
};
8690
}

0 commit comments

Comments
 (0)