Skip to main content

Module http_inspector

Module http_inspector 

Source
Expand description

A reverse proxy that watches one service’s HTTP traffic.

Stood in front of a running service on an ephemeral port: every request is forwarded upstream unchanged and reported to a callback, so the dashboard can show what a browser is actually asking the service for without the service knowing anything about it.

Transparent or it is useless. The status, the headers and the body all pass through as they came, and a WebSocket upgrade is handed off as a raw byte pipe rather than being parsed. The one header that changes is Host, which is rewritten to the upstream so a service that vhosts on it still answers.

An upstream that refuses is a 502 from here, and still an event — a request that failed to connect is exactly the sort a developer opened this to see.

Structs§

HttpInspectorEvent
One request, as the timeline records it.
HttpInspectorHandle
A running inspector, and the way to take it down.

Functions§

start
Stand an inspector in front of upstream_port.