(value: string)
| 241 | } |
| 242 | |
| 243 | function parsePublicBaseUrl(value: string): string { |
| 244 | const parsed = new URL(value); |
| 245 | parsed.hash = ""; |
| 246 | parsed.search = ""; |
| 247 | parsed.pathname = parsed.pathname.replace(/\/+$/, ""); |
| 248 | return parsed.toString().replace(/\/$/, ""); |
| 249 | } |
| 250 | |
| 251 | function localPublicBaseUrl(host: string, port: number): string { |
| 252 | const publicHost = host === "0.0.0.0" || host === "::" ? "127.0.0.1" : host; |