()
| 24 | |
| 25 | /** HTTP host for the vis API server. Defaults to loopback. */ |
| 26 | export function resolveHost(): string { |
| 27 | const raw = process.env['VIS_HOST'] ?? process.env['HOST']; |
| 28 | const host = raw?.trim(); |
| 29 | return host !== undefined && host.length > 0 ? host : '127.0.0.1'; |
| 30 | } |
| 31 | |
| 32 | export function isLoopbackHost(host: string): boolean { |
| 33 | const normalized = host.trim().toLowerCase().replaceAll('[', '').replaceAll(']', ''); |
no outgoing calls
no test coverage detected