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 provider.tsx

Steven Tey5fe1dbecfe4c
diff --git a/apps/web/ui/modals/provider.tsx b/apps/web/ui/modals/provider.tsx
index c4f7159eca..c6a3901b6f 100644
--- a/apps/web/ui/modals/provider.tsx
+++ b/apps/web/ui/modals/provider.tsx
@@ -59,7 +59,12 @@ export default function ModalProvider({ children }: { children: ReactNode }) {
const params = useParams() as { slug?: string };
const { slug } = params;
- const [hashes, setHashes] = useCookies<SimpleLinkProps[]>("hashes__dub", []);
+ const [hashes, setHashes] = useCookies<SimpleLinkProps[]>("hashes__dub", [], {
+ httpOnly: true,
+ sameSite: "lax",
+ domain: !!process.env.NEXT_PUBLIC_VERCEL_URL ? ".dub.co" : undefined,
+ secure: !!process.env.NEXT_PUBLIC_VERCEL_URL,
+ });
useEffect(() => {
if (hashes.length > 0) {