The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
prefix with "linkcache:", add _ to unsupported keys
Steven Teya2e40f2ff563
diff --git a/apps/web/lib/api/links/cache.ts b/apps/web/lib/api/links/cache.tsindex 60dbb29fd1..240a470f77 100644--- a/apps/web/lib/api/links/cache.ts+++ b/apps/web/lib/api/links/cache.ts@@ -85,7 +85,7 @@ class LinkCache {}_createKey({ domain, key }: Pick<LinkProps, "domain" | "key">) {- return `${domain}:${key}`.toLowerCase();+ return `linkcache:${domain}:${key}`.toLowerCase();}}diff --git a/packages/utils/src/functions/keys.ts b/packages/utils/src/functions/keys.tsindex ece0b43beb..4bf5ddad21 100644--- a/packages/utils/src/functions/keys.ts+++ b/packages/utils/src/functions/keys.ts@@ -4,7 +4,7 @@ export const validKeyRegex = new RegExp();export const isUnsupportedKey = (key: string) => {- const excludedPrefix = [".well-known"];+ const excludedPrefix = [".well-known", "_"];const excludedSuffix = [".php", ".php7"];return (excludedPrefix.some((prefix) => key.startsWith(prefix)) ||