fn preview_build_selection_response(
console_config: &ConsoleProxyConfig,
req: &Request<Body>,
) -> Result<Option<Response>, StatusCode>Expand description
Handles the ?preview_build=<label> selection parameter. A GET with a
label renders a confirmation page whose form POSTs the selection back; the
POST stores it in a cookie and redirects to the same path without the
parameter. The POST must additionally be same-origin (see
is_same_origin), so a cross-site navigation cannot change the served
build even if the fronting proxy’s session cookie policy were to allow
cross-site POSTs. Clearing (an empty label) is allowed on GET: it only
ever restores the default build and is the recovery path for a broken
selection. Returns None when the parameter is absent.