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

Function isSelfOriginUrl

apps/sim/tools/index.ts:1410–1412  ·  view source on GitHub ↗

* Checks whether a fully resolved URL points back to this Sim instance. * Used to propagate cycle-detection headers on API blocks that target * the platform's own workflow execution endpoints via absolute URL.

(url: string)

Source from the content-addressed store, hash-verified

1408 * the platform's own workflow execution endpoints via absolute URL.
1409 */
1410function isSelfOriginUrl(url: string): boolean {
1411 return isSameOrigin(url, getBaseUrl()) || isSameOrigin(url, getInternalApiBaseUrl())
1412}
1413
1414/**
1415 * Add internal authentication token to headers if running on server

Callers 1

executeToolRequestFunction · 0.85

Calls 3

isSameOriginFunction · 0.90
getBaseUrlFunction · 0.90
getInternalApiBaseUrlFunction · 0.90

Tested by

no test coverage detected