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

Function isLocalhostUrl

apps/sim/lib/core/utils/urls.ts:152–159  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

150 * at its development default in production.
151 */
152export function isLocalhostUrl(url: string): boolean {
153 try {
154 const { hostname } = new URL(url)
155 return LOCALHOST_HOSTNAMES.has(hostname)
156 } catch {
157 return false
158 }
159}
160
161/**
162 * Returns the current browser origin, or `null` when called server-side.

Callers 2

auth.tsFile · 0.90
urls.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected