MCPcopy Index your code
hub / github.com/docker/docker-agent / WithAllowPrivateIPs

Function WithAllowPrivateIPs

pkg/tools/builtin/openapi/openapi.go:77–79  ·  view source on GitHub ↗

WithAllowPrivateIPs disables SSRF dial-time protection on both the spec fetch and the generated tools' HTTP calls. Operators opt in via `allow_private_ips: true` when the spec or its servers legitimately target internal services. Tests use this to talk to httptest.NewServer.

(allow bool)

Source from the content-addressed store, hash-verified

75// `allow_private_ips: true` when the spec or its servers legitimately
76// target internal services. Tests use this to talk to httptest.NewServer.
77func WithAllowPrivateIPs(allow bool) Option {
78 return func(t *ToolSet) { t.allowPrivateIPs = allow }
79}
80
81func WithExpander(expander *js.Expander) Option {
82 return func(t *ToolSet) { t.expander = expander }

Calls

no outgoing calls