pub async fn read_request_with<S>(
s: &mut S,
role: &str,
limits: &ProxyLimits,
bearer: Option<&[u8]>,
) -> Result<ProxyRequest, ProxyError>Expand description
read_request for a listener with a bearer token (an exposed
listener, see InferProxy::start_exposed). The token is checked right
after the head, before any body is read, and then removed from the
request: it is this listener’s credential, not the model server’s. With
a token the Host need not be loopback (the credential, not the
address, is the guard); without one it must be.