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

Function toWebSocketUrl

apps/sim/lib/core/security/csp.ts:15–17  ·  view source on GitHub ↗
(httpUrl: string)

Source from the content-addressed store, hash-verified

13const DEFAULT_OLLAMA_URL = 'http://localhost:11434'
14
15function toWebSocketUrl(httpUrl: string): string {
16 return httpUrl.replace('http://', 'ws://').replace('https://', 'wss://')
17}
18
19function getHostnameFromUrl(url: string | undefined): string[] {
20 if (!url) return []

Callers 2

csp.tsFile · 0.85
generateRuntimeCSPFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected