Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update create-response-with-cookie.ts

Steven Teyedae6be31c43
diff --git a/apps/web/lib/middleware/utils/create-response-with-cookie.ts b/apps/web/lib/middleware/utils/create-response-with-cookie.ts
index eccd3e6d5b..4de36ed7e9 100644
--- a/apps/web/lib/middleware/utils/create-response-with-cookie.ts
+++ b/apps/web/lib/middleware/utils/create-response-with-cookie.ts
@@ -1,4 +1,3 @@
-import { punyEncode } from "@dub/utils";
import { NextResponse } from "next/server";
export function createResponseWithCookie(
@@ -6,7 +5,7 @@ export function createResponseWithCookie(
{ clickId, path }: { clickId: string; path: string },
): NextResponse {
response.cookies.set("dclid", clickId, {
- path: punyEncode(path), // encode the key to handle non-ASCII characters
+ path,
maxAge: 60 * 60, // 1 hour
});