From c28f784e35974b8c1c4ba6f07d6fe596ebf6812a Mon Sep 17 00:00:00 2001 From: Shane Loeffler Date: Tue, 7 Jan 2025 12:26:09 -0600 Subject: [PATCH] try hard coded referrer --- pages/api/og.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/api/og.js b/pages/api/og.js index abd3f53..febd571 100644 --- a/pages/api/og.js +++ b/pages/api/og.js @@ -8,9 +8,9 @@ import { postMetadata } from '../../utils/post-metadata' export const runtime = 'edge' -const getFonts = async (origin) => { +const getFonts = async () => { try { - const headers = new Headers({ Referer: origin }) + const headers = new Headers({ Referer: 'https://carbonplan.org' }) const [relativeMedium, faux, mono] = await Promise.all([ fetch('https://fonts.carbonplan.org/relative/relative-medium-pro.woff', { cache: 'force-cache', @@ -64,8 +64,7 @@ const getFonts = async (origin) => { export default async function handler(req) { try { - const origin = new URL(req.url).origin - const fonts = await getFonts(origin) + const fonts = await getFonts() const { searchParams } = new URL(req.url) const id = searchParams.get('id')