Skip to content

Commit ca20691

Browse files
authored
fix: self hosted feature check (calcom#21690)
1 parent 8461b82 commit ca20691

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/lib/constants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ export const CONSOLE_URL =
5454
process.env.NODE_ENV !== "production"
5555
? `https://console.cal.dev`
5656
: `https://console.cal.com`;
57-
export const IS_SELF_HOSTED = !(
58-
new URL(WEBAPP_URL).hostname.endsWith(".cal.dev") || new URL(WEBAPP_URL).hostname.endsWith(".cal.com")
59-
);
57+
const CAL_DOMAINS = [".cal.com", ".cal.dev", ".cal.eu", ".cal.qa"];
58+
const WEBAPP_HOSTNAME = new URL(WEBAPP_URL).hostname;
59+
export const IS_SELF_HOSTED = !CAL_DOMAINS.some((domain) => WEBAPP_HOSTNAME.endsWith(domain));
6060
export const EMBED_LIB_URL = process.env.NEXT_PUBLIC_EMBED_LIB_URL || `${WEBAPP_URL}/embed/embed.js`;
6161
export const TRIAL_LIMIT_DAYS = 14;
6262
export const MAX_SEATS_PER_TIME_SLOT = 1000;

0 commit comments

Comments
 (0)