mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-18 06:52:01 -05:00
d7fbb439e5
Formbricks no longer deploys to Vercel and does not support it for self-hosters. This removes all Vercel-specific deployment config, environment variables, and infrastructure references from the codebase. - Delete vercel.json and .vercelignore - Remove VERCEL_URL env var from env.ts, constants.ts, getPublicUrl.ts - Remove X-Vercel-IP-Country header from v1 and v2 response API routes - Remove VERCEL / VERCEL_URL from turbo.json build env passthrough - Update .env.example and docker-compose.yml comments - Update sentry.edge.config.ts comment - Remove VERCEL_URL from license.test.ts and getPublicUrl.test.ts mocks - Update docs to remove Vercel deployment references Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
446 B
TypeScript
14 lines
446 B
TypeScript
import "server-only";
|
|
import { env } from "./env";
|
|
|
|
const configuredWebappUrl = env.WEBAPP_URL?.trim() ?? "";
|
|
const WEBAPP_URL = configuredWebappUrl !== "" ? configuredWebappUrl : "http://localhost:3000";
|
|
|
|
/**
|
|
* Returns the public domain URL
|
|
* Uses PUBLIC_URL if set, otherwise falls back to WEBAPP_URL
|
|
*/
|
|
export const getPublicDomain = (): string => {
|
|
return env.PUBLIC_URL && env.PUBLIC_URL.trim() !== "" ? env.PUBLIC_URL : WEBAPP_URL;
|
|
};
|