From eddf83b9bb91b961645a519a34cd9aa43fe66630 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 17 Feb 2026 16:23:24 -0800 Subject: [PATCH] fix(shortlink): use redirect instead of rewrite for Beluga tracking --- apps/sim/next.config.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/apps/sim/next.config.ts b/apps/sim/next.config.ts index 828f95a5d1..9ec7ab6feb 100644 --- a/apps/sim/next.config.ts +++ b/apps/sim/next.config.ts @@ -324,20 +324,17 @@ const nextConfig: NextConfig = { ) } + // Beluga campaign short link tracking + if (isHosted) { + redirects.push({ + source: '/r/:shortCode', + destination: 'https://go.trybeluga.ai/:shortCode', + permanent: false, + }) + } + return redirects }, - async rewrites() { - return [ - ...(isHosted - ? [ - { - source: '/r/:shortCode', - destination: 'https://go.trybeluga.ai/:shortCode', - }, - ] - : []), - ] - }, } export default nextConfig