Skip to main content

geo_attribution_layer

Function geo_attribution_layer 

Source
pub fn geo_attribution_layer(
    notices: Vec<&'static str>,
) -> MapOutputLayer<impl Fn(Response) -> Response + Clone + Send + Sync + 'static>
Available on crate features cli and haproxy and http and net only.
Expand description

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.