(pathname, basePath)
| 480 | return segments.length ? `/${segments.join("/")}` : ""; |
| 481 | } |
| 482 | |
| 483 | function stripBasePath(pathname, basePath) { |
| 484 | const normalized = normalizeBasePath(basePath); |
| 485 | if (pathname === normalized || pathname === `${normalized}/`) return "/"; |
| 486 | if (normalized && pathname.startsWith(`${normalized}/`)) { |
| 487 | return pathname.slice(normalized.length); |
| 488 | } |
| 489 | return pathname; |
| 490 | } |
| 491 | |
| 492 | async function signedValue(payload, secret) { |
no test coverage detected