Skip to main content

accept

Function accept 

Source
pub fn accept(
    store: &Arc<ExecutionStore>,
    req: &Request,
    snapshot: &str,
) -> Result<Accepted, Response>
Expand description

Decide what a request to PATH means: an accepted connection, or the response to send instead.

The origin is checked here for the same reason it is checked for a state-changing request: a page on another origin can open a WebSocket to this server, and the same-origin policy does not stop it. This does.

snapshot is the route of executions.get, as the registry declares it: what a Withheld reference names as the place the whole value is read.