MCPcopy Create free account
hub / github.com/AnswerOverflow/AnswerOverflow / isOnMainSite

Function isOnMainSite

packages/constants/src/links.ts:41–49  ·  view source on GitHub ↗
(host: string)

Source from the content-addressed store, hash-verified

39};
40
41export const isOnMainSite = (host: string) => {
42 // TODO: Do we even need getMainSiteHostname()?
43 return (
44 host === getMainSiteHostname() ||
45 host.endsWith('.vercel.app') ||
46 host === 'https://www.answeroverflow.com' ||
47 host.endsWith('.rhyssul.com')
48 );
49};
50
51export const makeMainSiteLink = (path: string) => {
52 return `${getBaseUrl()}${path.startsWith('/') ? path : `/${path}`}`;

Callers 3

middlewareFunction · 0.90
handlerFunction · 0.90
handlerFunction · 0.90

Calls 1

getMainSiteHostnameFunction · 0.85

Tested by

no test coverage detected