fix(shortlink): use redirect instead of rewrite for Beluga tracking (#3239)

This commit is contained in:
Waleed
2026-02-17 16:27:20 -08:00
committed by GitHub
parent a0afb5d03e
commit 61a5c98717

View File

@@ -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