From 8e7c9a652fe564ecf9bc3f57b6204772870427d5 Mon Sep 17 00:00:00 2001 From: Aaron Coburn Date: Fri, 17 May 2024 02:06:22 -0500 Subject: [PATCH] Use VERCEL_URL in client ID generation (#37) --- pages/api/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/api/app.ts b/pages/api/app.ts index f092a7e..065a238 100644 --- a/pages/api/app.ts +++ b/pages/api/app.ts @@ -28,8 +28,8 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) { return res.status(405).send("Method Not Allowed"); } - const clientId = new URL("/api/app", `https://${req.headers.host}`); - const hostname = new URL("/", `https://${req.headers.host}`); + const clientId = new URL("/api/app", `https://${process.env.VERCEL_URL}`); + const hostname = new URL("/", `https://${process.env.VERCEL_URL}`); const acceptedType = accepts(req).type([ "application/ld+json",