File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
apps/web/app/app.dub.co/(deeplink)/deeplink/[domain]/[key] Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { redirect } from "next/navigation";
99import { DeepLinkActionButtons } from "./action-buttons" ;
1010import { BrandLogoBadge } from "./brand-logo-badge" ;
1111import { getLanguage , getTranslations } from "./translations" ;
12+ import { encodeKeyIfCaseSensitive } from "@/lib/api/links/case-sensitivity" ;
1213
1314export default async function DeepLinkPreviewPage ( props : {
1415 params : Promise < { domain : string ; key : string } > ;
@@ -23,11 +24,17 @@ export default async function DeepLinkPreviewPage(props: {
2324 const language = getLanguage ( acceptLanguage ) ;
2425 const t = getTranslations ( language ) ;
2526
27+ // Encode the key for case-sensitive domains before querying
28+ const encodedKey = encodeKeyIfCaseSensitive ( {
29+ domain,
30+ key
31+ } ) ;
32+
2633 const link = await prisma . link . findUnique ( {
2734 where : {
2835 domain_key : {
2936 domain,
30- key,
37+ key : encodedKey ,
3138 } ,
3239 } ,
3340 select : {
You can’t perform that action at this time.
0 commit comments