(pathname: string)
| 155 | } |
| 156 | |
| 157 | function htmlRouteAssetPath(pathname: string) { |
| 158 | const normalized = |
| 159 | pathname !== "/" && pathname.endsWith("/") |
| 160 | ? pathname.slice(0, -1) |
| 161 | : pathname; |
| 162 | return `${normalized}/index.html`; |
| 163 | } |
| 164 | |
| 165 | // Returns a stable lookup key for an IP address. |
| 166 | // IPv4: full address as /32 (e.g. "203.0.113.45/32"). |