submit token should be enough. no full user authentication needed

This commit is contained in:
mtrx 2024-12-28 02:12:46 +01:00
parent 7ba1605456
commit 917e7d824d
3 changed files with 5 additions and 0 deletions

View file

@ -10,6 +10,7 @@ extern crate serde_derive;
extern crate tera;
use actix_files as fs;
use actix_identity::IdentityMiddleware;
use actix_session::{storage::CookieSessionStore, SessionMiddleware};
use actix_web::cookie::Key;
use actix_web::{middleware::Logger, web::Data, App, HttpServer};
@ -30,6 +31,7 @@ async fn main() -> std::io::Result<()> {
env_logger::Builder::from_env(Env::default().default_filter_or("debug"));
App::new()
.wrap(IdentityMiddleware::default())
.wrap(SessionMiddleware::new(
CookieSessionStore::default(),
SESSION_COOKIE_SECRET_KEY.clone(),