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

Function resolvePublicTarget

apps/sim/lib/data-drains/destinations/webhook.ts:48–54  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

46const HEADER_INJECTION_PATTERN = /[\r\n\0]/
47
48async function resolvePublicTarget(url: string): Promise<string> {
49 const result = await validateUrlWithDNS(url, 'url')
50 if (!result.isValid || !result.resolvedIP) {
51 throw new Error(result.error ?? 'Webhook URL failed SSRF validation')
52 }
53 return result.resolvedIP
54}
55
56const webhookConfigSchema = z.object({
57 url: z

Callers 2

testFunction · 0.85
deliverFunction · 0.85

Calls 1

validateUrlWithDNSFunction · 0.90

Tested by 1

testFunction · 0.68