(pathname: string)
| 22 | } |
| 23 | |
| 24 | export function stripAppProxyBasePath(pathname: string): { |
| 25 | basePath: string | null; |
| 26 | routePathname: string; |
| 27 | } { |
| 28 | const basePath = getAppProxyBasePathFromPathname(pathname); |
| 29 | if (!basePath) { |
| 30 | return { basePath: null, routePathname: pathname }; |
| 31 | } |
| 32 | |
| 33 | const routePathname = pathname.slice(basePath.length); |
| 34 | return { |
| 35 | basePath, |
| 36 | routePathname: routePathname.length === 0 ? "/" : routePathname, |
| 37 | }; |
| 38 | } |
no test coverage detected