WithAllowPrivateIPs disables SSRF dial-time protection so the api tool may dial loopback / RFC1918 / link-local addresses. Operators opt in via `allow_private_ips: true` when the configured endpoint legitimately targets internal services. Tests use this to talk to httptest.NewServer.
(allow bool)
| 124 | // `allow_private_ips: true` when the configured endpoint legitimately |
| 125 | // targets internal services. Tests use this to talk to httptest.NewServer. |
| 126 | func WithAllowPrivateIPs(allow bool) Option { |
| 127 | return func(t *ToolSet) { t.allowPrivateIPs = allow } |
| 128 | } |
| 129 | |
| 130 | func New(apiConfig latest.APIToolConfig, expander *js.Expander, opts ...Option) *ToolSet { |
| 131 | t := &ToolSet{ |
no outgoing calls