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.

Pass `Referer` header to not found URL

Steven Teya02f97f73be9
diff --git a/apps/web/lib/middleware/link.ts b/apps/web/lib/middleware/link.ts
index 5fde8deab0..78ae91e864 100644
--- a/apps/web/lib/middleware/link.ts
+++ b/apps/web/lib/middleware/link.ts
@@ -77,6 +77,8 @@ export default async function LinkMiddleware(
headers: {
...DUB_HEADERS,
"X-Robots-Tag": "googlebot: noindex",
+ // pass the referrer to the not found page
+ Referer: req.url,
},
status: 302,
});