()
| 24 | * @throws Error if NEXT_PUBLIC_APP_URL is not configured |
| 25 | */ |
| 26 | export function getBaseUrl(): string { |
| 27 | const baseUrl = getEnv('NEXT_PUBLIC_APP_URL')?.trim() |
| 28 | |
| 29 | if (!baseUrl) { |
| 30 | throw new Error( |
| 31 | 'NEXT_PUBLIC_APP_URL must be configured for webhooks and callbacks to work correctly' |
| 32 | ) |
| 33 | } |
| 34 | |
| 35 | return normalizeBaseUrl(baseUrl) |
| 36 | } |
| 37 | |
| 38 | /** |
| 39 | * Returns the base URL used by server-side internal API calls. |
no test coverage detected