* Returns true when the host is a loopback address for which plain `http://` is * tolerated (local MinIO development on a self-hosted deployment). Any other * host must use `https://`. This is only an early check — the SSRF boundary is * enforced at request time by secureFetchWithRetry, w
(host: string)
| 130 | * loopback/private targets on hosted Sim regardless of what this parser accepts. |
| 131 | */ |
| 132 | function isLoopbackHost(host: string): boolean { |
| 133 | const bare = host.replace(/^\[|\]$/g, '') |
| 134 | return bare === 'localhost' || bare === '127.0.0.1' || bare === '::1' |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * Parses and validates a custom S3-compatible endpoint string. |
no test coverage detected