diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -29,7 +29,7 @@ use hyper::{Method, Server, StatusCode, Body}; use hyper::http::request::Parts; use hyper::http::response::Builder; use serde::Deserialize; -use sputnik::{mime, request::{SputnikParts, SputnikBody}, response::SputnikBuilder}; +use sputnik::{mime, request::{SputnikParts, SputnikBody, CsrfToken}, response::SputnikBuilder}; use sputnik::request::CsrfProtectedFormError; type Response = hyper::Response<Body>; @@ -63,7 +63,7 @@ fn get_form(req: &mut Parts) -> Response { .body( format!( "<form method=post><input name=text>{}<button>Submit</button></form>", - req.csrf_token().html_input() + CsrfToken::from_request(req).html_input() ).into() ).unwrap() } |