Skip to main content

page_with_visitor_token

Function page_with_visitor_token 

Source
pub fn page_with_visitor_token(
    page: &HttpResponse,
    token: &HttpResponse,
) -> Option<HttpResponse>
Expand description

A page document composed for one visitor of a server that answers CSRF tokens: page with the visitor’s token in its head (token is the server’s answer at its reserved token path), that answer’s Set-Cookie set on it, and the whole never stored by a cache — the document is this visitor’s alone. None when token is no token (a server with no ## Session does not serve the path), and the page goes out as it was.