Update for 2nd release candidate
This commit is contained in:
parent
610f27297c
commit
5002bdbab5
|
@ -16,5 +16,4 @@ publish = true
|
||||||
base64 = { version = "0.13.0" }
|
base64 = { version = "0.13.0" }
|
||||||
bcrypt = { version = "0.9" }
|
bcrypt = { version = "0.9" }
|
||||||
rand = { version = "0.8.3" }
|
rand = { version = "0.8.3" }
|
||||||
rocket = { version = "0.5.0-rc.1", features = ["secrets"] }
|
rocket = { version = "0.5.0-rc.2", features = ["secrets"] }
|
||||||
time = { version = "0.2.25" }
|
|
||||||
|
|
|
@ -5,10 +5,10 @@ use rocket::{
|
||||||
fairing::{self, Fairing as RocketFairing, Info, Kind},
|
fairing::{self, Fairing as RocketFairing, Info, Kind},
|
||||||
http::{Cookie, Status},
|
http::{Cookie, Status},
|
||||||
request::{FromRequest, Outcome},
|
request::{FromRequest, Outcome},
|
||||||
|
time::{Duration, OffsetDateTime},
|
||||||
Data, Request, Rocket, State,
|
Data, Request, Rocket, State,
|
||||||
};
|
};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use time::{Duration, OffsetDateTime};
|
|
||||||
|
|
||||||
const BCRYPT_COST: u32 = 8;
|
const BCRYPT_COST: u32 = 8;
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ fn rocket() -> rocket::Rocket<rocket::Build> {
|
||||||
rocket_csrf::CsrfConfig::default()
|
rocket_csrf::CsrfConfig::default()
|
||||||
.with_cookie_name(COOKIE_NAME)
|
.with_cookie_name(COOKIE_NAME)
|
||||||
.with_cookie_len(COOKIE_LEN)
|
.with_cookie_len(COOKIE_LEN)
|
||||||
.with_lifetime(time::Duration::days(3)),
|
.with_lifetime(rocket::time::Duration::days(3)),
|
||||||
))
|
))
|
||||||
.mount("/", routes![index])
|
.mount("/", routes![index])
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ fn rocket() -> rocket::Rocket<rocket::Build> {
|
||||||
rocket_csrf::CsrfConfig::default()
|
rocket_csrf::CsrfConfig::default()
|
||||||
.with_cookie_name(COOKIE_NAME)
|
.with_cookie_name(COOKIE_NAME)
|
||||||
.with_cookie_len(COOKIE_LEN)
|
.with_cookie_len(COOKIE_LEN)
|
||||||
.with_lifetime(time::Duration::days(3)),
|
.with_lifetime(rocket::time::Duration::days(3)),
|
||||||
))
|
))
|
||||||
.mount("/", routes![index])
|
.mount("/", routes![index])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue