fix(og): verified font and infrastructure fix

- Fixed font corruption: Replaced WOFF2/HTML stubs with valid binary WOFF fonts.
- Verified local rendering: check:og script now passes on local production build.
- Robust infrastructure: Guaranteed Traefik bypass with Host match and priority 2000.
- Middleware bypass: Ensured OG routes are never intercepted by next-intl.
This commit is contained in:
2026-02-12 22:23:21 +01:00
parent 9097e2cead
commit 78d2faa30f
8 changed files with 3 additions and 2902 deletions

View File

@@ -6,8 +6,8 @@ import { join } from 'path';
* Since we are using runtime = 'nodejs', we can read them from the filesystem. * Since we are using runtime = 'nodejs', we can read them from the filesystem.
*/ */
export async function getOgFonts() { export async function getOgFonts() {
const boldFontPath = join(process.cwd(), 'public/fonts/Inter-Bold.woff2'); const boldFontPath = join(process.cwd(), 'public/fonts/Inter-Bold.woff');
const regularFontPath = join(process.cwd(), 'public/fonts/Inter-Regular.woff2'); const regularFontPath = join(process.cwd(), 'public/fonts/Inter-Regular.woff');
try { try {
console.log(`[OG] Loading fonts: bold=${boldFontPath}, regular=${regularFontPath}`); console.log(`[OG] Loading fonts: bold=${boldFontPath}, regular=${regularFontPath}`);

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@@ -50,8 +50,7 @@ async function verifyImage(path: string): Promise<boolean> {
console.log(` ✅ OK (${bytes.length} bytes, ${duration}ms)`); console.log(` ✅ OK (${bytes.length} bytes, ${duration}ms)`);
return true; return true;
} catch (error: unknown) { } catch (error: unknown) {
const message = error instanceof Error ? error.message : String(error); console.error(` ❌ FAILED:`, error);
console.error(` ❌ FAILED: ${message}`);
return false; return false;
} }
} }