MCPcopy Index your code
hub / github.com/coder/mux / joinPublicBasePath

Function joinPublicBasePath

src/node/orpc/server.ts:575–584  ·  view source on GitHub ↗
(publicBasePath: string, routePathname: string)

Source from the content-addressed store, hash-verified

573}
574
575function joinPublicBasePath(publicBasePath: string, routePathname: string): string {
576 const normalizedBasePath = normalizePublicBasePath(publicBasePath) ?? "/";
577 const normalizedRoutePathname = routePathname.startsWith("/")
578 ? routePathname
579 : `/${routePathname}`;
580
581 return normalizedBasePath === "/"
582 ? normalizedRoutePathname
583 : `${normalizedBasePath}${normalizedRoutePathname}`;
584}
585
586function getDirectAppProxyHandlerPrefix(
587 req: express.Request,

Callers 4

getPublicAppRootPathFunction · 0.85
buildPublicAbsoluteUrlFunction · 0.85
createOrpcServerFunction · 0.85

Calls 1

normalizePublicBasePathFunction · 0.85

Tested by

no test coverage detected