diff options
author | Vincent Ambo <tazjin@gmail.com> | 2018-04-10T07·53+0200 |
---|---|---|
committer | Vincent Ambo <tazjin@gmail.com> | 2018-04-10T07·53+0200 |
commit | 4eb0a57177b82c9d2fc65b610a77bb9fd3226693 (patch) | |
tree | ef3f0c2d8172b05da9113c7479bdb19285d80d2e | |
parent | f599f661bad023955aaa3436224914bb9933256e (diff) |
fix(main): Update cookie session setup for new actix-web
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index ef5d2e92f1b4..d748be64f945 100644 --- a/src/main.rs +++ b/src/main.rs @@ -36,7 +36,7 @@ pub mod schema; use actix::prelude::*; use actix_web::*; -use actix_web::middleware::{Logger, SessionStorage, CookieSessionBackendBuilder}; +use actix_web::middleware::{Logger, SessionStorage, CookieSessionBackend}; use actix_web::http::Method; use db::*; use diesel::pg::PgConnection; @@ -103,9 +103,8 @@ fn main() { }; let sessions = SessionStorage::new( - CookieSessionBackendBuilder::new(&key) - .secure(base_url.starts_with("https")) - .finish()); + CookieSessionBackend::signed(&key) + .secure(base_url.starts_with("https"))); App::with_state(state) .middleware(Logger::default()) |