MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / shouldRedirectToDomain

Function shouldRedirectToDomain

apps/web/utilities/redirects.ts:34–51  ·  view source on GitHub ↗
({
  account,
  communityName,
  isSubdomainbasedRouting,
}: {
  account: SerializedAccount;
  communityName: string;
  isSubdomainbasedRouting: boolean;
})

Source from the content-addressed store, hash-verified

32}
33
34export function shouldRedirectToDomain({
35 account,
36 communityName,
37 isSubdomainbasedRouting,
38}: {
39 account: SerializedAccount;
40 communityName: string;
41 isSubdomainbasedRouting: boolean;
42}) {
43 if (process.env.SKIP_REDIRECT === 'true') return false;
44 return (
45 account.premium &&
46 !!account.redirectDomain &&
47 communityName !== account.redirectDomain &&
48 !isSubdomainbasedRouting &&
49 account.redirectDomainPropagate
50 );
51}
52
53export function redirectChannelToDomain({
54 account,

Callers 3

threadGetServerSidePropsFunction · 0.90
topicGetServerSidePropsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected