Documentation
¶
Index ¶
Constants ¶
const FetchPath = "/util/fetch"
FetchPath is the catalog path of the fetch_url operation. The embedded OpenAPI spec, the mux route here, and the path callers pass to api_invoke_endpoint / api_export must all agree on this literal.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New builds the util operations handler the api gateway dispatches handler=internal connections to. The returned handler serves the operations the embedded catalog spec (SpecJSON) declares; the two are versioned together in this package so they cannot drift.
Every outbound dial passes the shared egress guard, whose transport ignores proxy environment variables: an egress proxy sits inside the network perimeter, and routing a guarded fetch through it would let the proxy reach a destination the guard just refused.
Types ¶
type Options ¶
type Options struct {
// AllowPrivateCIDRs lists prefixes exempted from the internal-range
// SSRF block (apigateway.util_connection.allow_private_cidrs).
// Empty means the default posture: public destinations open,
// internal address space closed. An exemption grants ANY TCP port
// on the listed range, so scope it to the specific host prefixes a
// deployment must fetch from — a broad grant turns fetch_url into an
// internal port-reach primitive.
AllowPrivateCIDRs []string
}
Options configures the util handler.