feat: add gtm to load in us only (#16146)
* add gtm to load in us only * fix: Tried to give typescript some help * fix: Alternative fix * fix: Add yarn.lock * fix: Oops * fix: type err --------- Co-authored-by: Alex van Andel <[email protected]> Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
6 files changed
+165
-32
No files matched your search
@@ -0,0 +1,7 @@
|
||||
import type { NextApiRequest, NextApiResponse } from "next";
|
||||
|
||||
export default function handler(req: NextApiRequest, res: NextApiResponse) {
|
||||
const country = req.headers["x-vercel-ip-country"] || "Unknown";
|
||||
res.setHeader("Cache-Control", "public, max-age=3600, s-maxage=3600, stale-while-revalidate=86400");
|
||||
res.status(200).json({ country });
|
||||
}
|
||||
Reference in new issue
Block a user