Skip to content

OG image endpoints fetch font from a third-party URL at build time #13

Closed

Description

@ephbaum

Describe the bug

Both OG image endpoints (`src/pages/v1/generate/og/[slug].png.ts` and `default.png.ts`) did a top-level `await fetch(...)` against a third-party demo host (`og-playground.vercel.app`) to get a font at build time. Every production build depends on that unrelated service's uptime — a network call that has no business being part of the build.

Expected behavior

No network calls at build time. The font should be vendored into the repo (`public/fonts/`) and read via `readFileSync`.

Additional context

The host was reachable throughout, so this was never actually the cause of an outage — but it was a real latent fragility, and the code already carried a `@TODO` asking for the font to be vendored. Fixed in #9.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions