From f6255566b0ef0cec5a58a296d64dffe6cb4c5469 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 8 Oct 2023 18:20:34 -0500 Subject: [PATCH] chg: Allow insecure cookies --- actix/src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/actix/src/main.rs b/actix/src/main.rs index 439d5fe..00e1b7c 100644 --- a/actix/src/main.rs +++ b/actix/src/main.rs @@ -127,10 +127,11 @@ async fn main() -> std::io::Result<()> { // Actually start the server HttpServer::new(move || { App::new() - .wrap(SessionMiddleware::new( - CookieSessionStore::default(), - secret_key.clone(), - )) + .wrap( + SessionMiddleware::builder(CookieSessionStore::default(), secret_key.clone()) + .cookie_secure(false) + .build(), + ) // Maintain a single instance of database throughout .app_data(web::Data::new(AppState { db: database::open_db(env::var("db_url").unwrap_or(db_location.clone())),