The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update verify-analytics-allowed-hostnames.ts
Steven Teybc41d19e8b8d
diff --git a/apps/web/lib/analytics/verify-analytics-allowed-hostnames.ts b/apps/web/lib/analytics/verify-analytics-allowed-hostnames.tsindex 151b6b9a57..a06e3b131c 100644--- a/apps/web/lib/analytics/verify-analytics-allowed-hostnames.ts+++ b/apps/web/lib/analytics/verify-analytics-allowed-hostnames.ts@@ -12,7 +12,7 @@ export const verifyAnalyticsAllowedHostnames = ({const source = req.headers.get("referer") || req.headers.get("origin");const sourceUrl = source ? new URL(source) : null;- const hostname = sourceUrl?.hostname;+ const hostname = sourceUrl?.hostname.replace(/^www\./, "");if (!hostname) {console.log("No hostname found in request. Denying request ❌", {