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

Function isTopLevelPathname

apps/web/utilities/middlewareHelper.ts:21–37  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

19// '/verify-request',
20// ];
21function isTopLevelPathname(pathname: string) {
22 return (
23 // PAGES.includes(pathname) ||
24 pathname.startsWith('/profile') ||
25 pathname.startsWith('/signup') ||
26 pathname.startsWith('/signin') ||
27 pathname.startsWith('/forgot-password') ||
28 pathname.startsWith('/reset-password') ||
29 pathname.startsWith('/verify-request') ||
30 pathname.startsWith('/api') ||
31 pathname.startsWith('/sitemap') ||
32 pathname.startsWith('/robots.txt') ||
33 pathname.startsWith('/_next') ||
34 pathname.startsWith('/pp') ||
35 pathname.startsWith('/ph')
36 );
37}
38
39const cleanLinenHost = (hostname: string) =>
40 hostname.indexOf('linen.dev') > -1 ? 'www.linen.dev' : hostname;

Callers 1

rewriteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected