From 61a5c98717480f68770465438c4d8ad7988638a0 Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Feb 2026 16:27:20 -0800 Subject: [PATCH] fix(shortlink): use redirect instead of rewrite for Beluga tracking (#3239) --- 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 828f95a5d..9ec7ab6fe 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