fix(og): robust infrastructure fix for OG image check
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m39s
Build & Deploy / 🏗️ Build (push) Successful in 2m59s
Build & Deploy / 🚀 Deploy (push) Successful in 27s
Build & Deploy / 🧪 Smoke Test (push) Failing after 52s
Build & Deploy / 🔔 Notify (push) Successful in 2s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m39s
Build & Deploy / 🏗️ Build (push) Successful in 2m59s
Build & Deploy / 🚀 Deploy (push) Successful in 27s
Build & Deploy / 🧪 Smoke Test (push) Failing after 52s
Build & Deploy / 🔔 Notify (push) Successful in 2s
- Added exhaustive PathRegexp whitelists in docker-compose.yml to bypass Gatekeeper. - Fixed TRAEFIK_HOST_RULE interpolation in deploy.yml. - Enhanced scripts/check-og-images.ts with header and body diagnostics. - Added server-side font loading logs in lib/og-helper.tsx.
This commit is contained in:
@@ -29,8 +29,9 @@ async function verifyImage(path: string): Promise<boolean> {
|
||||
const contentType = response.headers.get('content-type');
|
||||
if (!contentType?.includes('image/png')) {
|
||||
const body = await response.text();
|
||||
console.log(` Headers: ${JSON.stringify(Object.fromEntries(response.headers))}`);
|
||||
throw new Error(
|
||||
`Content-Type: ${contentType}. Body: ${body.substring(0, 200).replace(/\n/g, ' ')}...`,
|
||||
`Content-Type: ${contentType}. Body preview: ${body.substring(0, 500).replace(/\n/g, ' ')}...`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user