fix: self hosted feature check (#21690)

This commit is contained in:
Omar López
2025-06-03 17:00:48 +00:00
committed by GitHub
parent 8461b82f0d
commit ca206915bf
+3 -3
View File
@@ -54,9 +54,9 @@ export const CONSOLE_URL =
process.env.NODE_ENV !== "production"
? `https://console.cal.dev`
: `https://console.cal.com`;
export const IS_SELF_HOSTED = !(
new URL(WEBAPP_URL).hostname.endsWith(".cal.dev") || new URL(WEBAPP_URL).hostname.endsWith(".cal.com")
);
const CAL_DOMAINS = [".cal.com", ".cal.dev", ".cal.eu", ".cal.qa"];
const WEBAPP_HOSTNAME = new URL(WEBAPP_URL).hostname;
export const IS_SELF_HOSTED = !CAL_DOMAINS.some((domain) => WEBAPP_HOSTNAME.endsWith(domain));
export const EMBED_LIB_URL = process.env.NEXT_PUBLIC_EMBED_LIB_URL || `${WEBAPP_URL}/embed/embed.js`;
export const TRIAL_LIMIT_DAYS = 14;
export const MAX_SEATS_PER_TIME_SLOT = 1000;