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.

debug logs

Steven Tey4a8281abbc76
diff --git a/pages/api/projects/[slug]/domains/[domain]/links/[key]/revalidate.ts b/pages/api/projects/[slug]/domains/[domain]/links/[key]/revalidate.ts
index 77225adec4..87e312c452 100644
--- a/pages/api/projects/[slug]/domains/[domain]/links/[key]/revalidate.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/links/[key]/revalidate.ts
@@ -6,11 +6,16 @@ export default async function handler(
) {
const { domain, key } = req.query as { domain: string; key: string };
+ console.log("incoming data", domain, key);
+
res.setHeader("Access-Control-Allow-Origin", "https://app.dub.sh");
res.setHeader("Access-Control-Allow-Methods", "PUT");
+ console.log("passed CORS");
+
try {
const response = await res.revalidate(`/proxy/${domain}/${key}`);
+ console.log("successfully revalidated", response);
res.status(200).json({
message: "OK",
});