fix(chat-subs): always use getBaseUrl helper to fetch base url (#1643)

* fix(chat-subs): always use next public app url env

* use getBaseUrl everywhere

* move remaining uses

* fix test

* change auth.ts and make getBaseUrl() call not top level for emails

* change remaining uses

* revert csp

* cleanup

* fix
This commit is contained in:
Vikhyath Mondreti
2025-10-15 14:13:23 -07:00
committed by GitHub
parent 4cceb22f21
commit eb4821ff30
46 changed files with 180 additions and 306 deletions

View File

@@ -1,7 +1,6 @@
import { createContext, Script } from 'vm'
import { type NextRequest, NextResponse } from 'next/server'
import { env, isTruthy } from '@/lib/env'
import { MAX_EXECUTION_DURATION } from '@/lib/execution/constants'
import { executeInE2B } from '@/lib/execution/e2b'
import { CodeLanguage, DEFAULT_CODE_LANGUAGE, isValidCodeLanguage } from '@/lib/execution/languages'
import { createLogger } from '@/lib/logs/console/logger'
@@ -9,7 +8,9 @@ import { validateProxyUrl } from '@/lib/security/input-validation'
import { generateRequestId } from '@/lib/utils'
export const dynamic = 'force-dynamic'
export const runtime = 'nodejs'
export const maxDuration = MAX_EXECUTION_DURATION
// Segment config exports must be statically analyzable.
// Mirror MAX_EXECUTION_DURATION (210s) from '@/lib/execution/constants'.
export const maxDuration = 210
const logger = createLogger('FunctionExecuteAPI')