Crate mz_http_util

source ·
Expand description

HTTP utilities.


  • 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.



  • 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.
  • Serves a basic liveness check response
  • Serves metrics from the selected metrics registry variant.
  • Dynamically reloads a filter for a tracing layer.
  • Returns information about the current status of tracing.
  • Renders a template into an HTTP response.