(pathname: string)
| 9 | } |
| 10 | |
| 11 | export function getAppProxyBasePathFromPathname(pathname: string): string | null { |
| 12 | if (hasUnsafeLeadingDoubleSlash(pathname)) { |
| 13 | return null; |
| 14 | } |
| 15 | |
| 16 | const match = APP_PROXY_BASE_PATH_RE.exec(pathname); |
| 17 | if (!match) { |
| 18 | return null; |
| 19 | } |
| 20 | |
| 21 | return stripTrailingSlash(match[0]); |
| 22 | } |
| 23 | |
| 24 | export function stripAppProxyBasePath(pathname: string): { |
| 25 | basePath: string | null; |
no test coverage detected