openclaw/src/plugin-sdk/ssrf-runtime.ts

20 lines
630 B
TypeScript

// Narrow SSRF helpers for extensions that need pinned-dispatcher and policy
// utilities without loading the full infra-runtime surface.
export {
closeDispatcher,
createPinnedDispatcher,
isBlockedHostnameOrIp,
resolvePinnedHostname,
resolvePinnedHostnameWithPolicy,
type LookupFn,
type SsrFPolicy,
} from "../infra/net/ssrf.js";
export { formatErrorMessage } from "../infra/errors.js";
export { fetchWithSsrFGuard } from "../infra/net/fetch-guard.js";
export {
assertHttpUrlTargetsPrivateNetwork,
buildHostnameAllowlistPolicyFromSuffixAllowlist,
ssrfPolicyFromAllowPrivateNetwork,
} from "./ssrf-policy.js";