|
1 | 1 | import type { NextConfig } from 'next' |
2 | 2 | import { env, getEnv, isTruthy } from './lib/core/config/env' |
3 | | -import { isDev, isHosted } from './lib/core/config/feature-flags' |
| 3 | +import { isDev } from './lib/core/config/feature-flags' |
4 | 4 | import { |
5 | 5 | getFormEmbedCSPPolicy, |
6 | 6 | getMainCSPPolicy, |
@@ -306,32 +306,12 @@ const nextConfig: NextConfig = { |
306 | 306 | } |
307 | 307 | ) |
308 | 308 |
|
309 | | - // Only enable domain redirects for the hosted version |
310 | | - if (isHosted) { |
311 | | - redirects.push( |
312 | | - { |
313 | | - source: '/((?!api|_next|_vercel|favicon|static|ingest|.*\\..*).*)', |
314 | | - destination: 'https://www.sim.ai/$1', |
315 | | - permanent: true, |
316 | | - has: [{ type: 'host' as const, value: 'simstudio.ai' }], |
317 | | - }, |
318 | | - { |
319 | | - source: '/((?!api|_next|_vercel|favicon|static|ingest|.*\\..*).*)', |
320 | | - destination: 'https://www.sim.ai/$1', |
321 | | - permanent: true, |
322 | | - has: [{ type: 'host' as const, value: 'www.simstudio.ai' }], |
323 | | - } |
324 | | - ) |
325 | | - } |
326 | | - |
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 | | - } |
| 309 | + // Beluga campaign short link tracking (always registered — harmless for self-hosted) |
| 310 | + redirects.push({ |
| 311 | + source: '/r/:shortCode', |
| 312 | + destination: 'https://go.trybeluga.ai/:shortCode', |
| 313 | + permanent: false, |
| 314 | + }) |
335 | 315 |
|
336 | 316 | return redirects |
337 | 317 | }, |
|
0 commit comments