Skip to main content

Module geo

Module geo 

Source
Available on crate features cli and haproxy and http and net only.
Expand description

Shared bits for enriching CLI service responses with IP geolocation.

Functions§

geo_attribution_html_comment
The attribution notices as a single well-formed HTML comment, or None when empty. Any -- is neutralised so a notice cannot close the comment early (ours contain none, but the input is not assumed trusted).
geo_attribution_layer
A layer that appends each attribution notice to every response as an x-geo-attribution header value. Pass the loaded databases’ notices (IpGeoDb::attributions()); add the layer only when that list is non-empty.
geo_location_rows
Human-readable (label, value) rows for a resolved GeoLocation, shared by the HTML renderers (the serve ip page panel and the serve fp report table). Empty fields are omitted.