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.

Use Fluid compute for /track/click

Steven Tey20f3b09fc0dc
diff --git a/apps/web/app/(ee)/api/track/click/route.ts b/apps/web/app/(ee)/api/track/click/route.ts
index 9aff771ab2..b76584557f 100644
--- a/apps/web/app/(ee)/api/track/click/route.ts
+++ b/apps/web/app/(ee)/api/track/click/route.ts
@@ -20,8 +20,6 @@ import { AxiomRequest, withAxiom } from "next-axiom";
import { NextResponse } from "next/server";
import { z } from "zod";
-export const runtime = "edge";
-
const CORS_HEADERS = {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "POST, OPTIONS",
@@ -52,7 +50,7 @@ const trackClickResponseSchema = z.object({
}).nullish(),
});
-// POST /api/track/click – Track a click event from the client-side
+// POST /api/track/click – Track a click event for a link
export const POST = withAxiom(async (req: AxiomRequest) => {
try {
const { domain, key, url, referrer } = trackClickSchema.parse(