Crate mz_http_util

Source
Expand description

HTTP utilities.

Macros§

make_handle_static
Generates a handle_static function that serves static content for HTTP servers. Expects three arguments: an include_dir::Dir object where the static content is served, and two strings representing the (crate-local) paths to the production and development static files.

Structs§

DynamicFilterTarget

Functions§

build_cors_allowed_origin
Construct a CORS policy to allow origins to query us via HTTP. If any bare ‘’ is passed, this allows any origin; otherwise, allows a list of origins, which can include wildcard subdomains. If the allowed origin starts with a ‘’, allow anything from that glob. Otherwise check for an exact match.
handle_liveness_check
Serves a basic liveness check response
handle_prometheus
Serves metrics from the selected metrics registry variant.
handle_reload_tracing_filter
Dynamically reloads a filter for a tracing layer.
handle_tracing
Returns information about the current status of tracing.
template_response
Renders a template into an HTTP response.