MCPcopy Index your code
hub / github.com/simstudioai/sim / isLoopbackHost

Function isLoopbackHost

apps/sim/connectors/s3/s3.ts:132–135  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

130 * loopback/private targets on hosted Sim regardless of what this parser accepts.
131 */
132function 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.

Callers 1

parseEndpointFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected