(host: string | undefined)
| 15 | } |
| 16 | |
| 17 | export function isLoopbackHost(host: string | undefined): boolean { |
| 18 | if (!host) return false; |
| 19 | const normalized = normalizeHost(host); |
| 20 | return normalized === 'localhost' |
| 21 | || normalized === '127.0.0.1' |
| 22 | || normalized === '::1' |
| 23 | || normalized === '0:0:0:0:0:0:0:1'; |
| 24 | } |
| 25 | |
| 26 | export function isLoopbackAddress(address: string | undefined): boolean { |
| 27 | if (!address) return false; |
no test coverage detected