MCPcopy
hub / github.com/coder/mux / stripInitialAppProxyBasePathFromPathname

Function stripInitialAppProxyBasePathFromPathname

src/browser/utils/frontendBasePath.ts:25–34  ·  view source on GitHub ↗
(pathname: string)

Source from the content-addressed store, hash-verified

23}
24
25export function stripInitialAppProxyBasePathFromPathname(pathname: string): string {
26 if (!INITIAL_APP_PROXY_BASE_PATH) {
27 return pathname;
28 }
29
30 const strippedPathname = stripAppProxyBasePath(pathname);
31 return strippedPathname.basePath === INITIAL_APP_PROXY_BASE_PATH
32 ? strippedPathname.routePathname
33 : pathname;
34}
35
36export function prependInitialAppProxyBasePath(pathname: string): string {
37 const rootRelativePathname = normalizeRootRelativePath(pathname);

Callers 2

getInitialRouteFunction · 0.90
useUrlSyncFunction · 0.90

Calls 1

stripAppProxyBasePathFunction · 0.90

Tested by

no test coverage detected