The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update [endpoint].ts
Steven Tey001a53e9caa5
diff --git a/pages/api/edge/links/[key]/stats/[endpoint].ts b/pages/api/edge/links/[key]/stats/[endpoint].tsindex 570a4e1c9f..49e2d57547 100644--- a/pages/api/edge/links/[key]/stats/[endpoint].ts+++ b/pages/api/edge/links/[key]/stats/[endpoint].ts@@ -12,7 +12,8 @@ export default async function handler(req: NextRequest) {const key = req.nextUrl.searchParams.get("key");const interval = req.nextUrl.searchParams.get("interval");const endpoint = req.nextUrl.searchParams.get("endpoint");- let domain = req.headers.get("host");+ console.log("domain", req.headers.get("host"), req.nextUrl.hostname);+ let domain = req.nextUrl.hostname;if (isHomeHostname(domain)) domain = "dub.sh";// don't need to check if the link has public stats if the link is dub.sh/github (demo link)