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:
@@ -6,8 +6,8 @@ import { join } from 'path';
|
||||
* Since we are using runtime = 'nodejs', we can read them from the filesystem.
|
||||
*/
|
||||
export async function getOgFonts() {
|
||||
const boldFontPath = join(process.cwd(), 'public/fonts/Inter-Bold.woff2');
|
||||
const regularFontPath = join(process.cwd(), 'public/fonts/Inter-Regular.woff2');
|
||||
const boldFontPath = join(process.cwd(), 'public/fonts/Inter-Bold.woff');
|
||||
const regularFontPath = join(process.cwd(), 'public/fonts/Inter-Regular.woff');
|
||||
|
||||
try {
|
||||
console.log(`[OG] Loading fonts: bold=${boldFontPath}, regular=${regularFontPath}`);
|
||||
|
||||
File diff suppressed because one or more lines are too long
BIN
public/fonts/Inter-Bold.woff
Normal file
BIN
public/fonts/Inter-Bold.woff
Normal file
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
BIN
public/fonts/Inter-Regular.woff
Normal file
BIN
public/fonts/Inter-Regular.woff
Normal file
Binary file not shown.
Binary file not shown.
@@ -50,8 +50,7 @@ async function verifyImage(path: string): Promise<boolean> {
|
||||
console.log(` ✅ OK (${bytes.length} bytes, ${duration}ms)`);
|
||||
return true;
|
||||
} catch (error: unknown) {
|
||||
const message = error instanceof Error ? error.message : String(error);
|
||||
console.error(` ❌ FAILED: ${message}`);
|
||||
console.error(` ❌ FAILED:`, error);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user