Skip to content

Commit f63f8d9

Browse files
committed
fix(shortlink): use redirect instead of rewrite for Beluga tracking (#3239)
1 parent 24da32b commit f63f8d9

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

apps/sim/next.config.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -324,20 +324,17 @@ const nextConfig: NextConfig = {
324324
)
325325
}
326326

327+
// Beluga campaign short link tracking
328+
if (isHosted) {
329+
redirects.push({
330+
source: '/r/:shortCode',
331+
destination: 'https://go.trybeluga.ai/:shortCode',
332+
permanent: false,
333+
})
334+
}
335+
327336
return redirects
328337
},
329-
async rewrites() {
330-
return [
331-
...(isHosted
332-
? [
333-
{
334-
source: '/r/:shortCode',
335-
destination: 'https://go.trybeluga.ai/:shortCode',
336-
},
337-
]
338-
: []),
339-
]
340-
},
341338
}
342339

343340
export default nextConfig

0 commit comments

Comments
 (0)