-
Notifications
You must be signed in to change notification settings - Fork 215
Open
Description
How can I have different cookies for different parts of a site?
The root
:/
is for a public-facing site that log regular users, and '/admin' is only for employees.
I tried:
App::new()
..
.wrap(
IdentityMiddleware::builder()
.id_key("bestseller.user_id")
.last_visit_unix_timestamp_key("bestseller.last_visit")
.login_unix_timestamp_key("bestseller.login")
.build(),
)
.wrap(
SessionMiddleware::builder(CookieSessionStore::default(), Key::from(&[123; 64]))
.cookie_name("bestseller_session".into())
.build(),
)
.wrap(TracingLogger::default()) //always last
.service(fs::Files::new("/static", static_path()))
.configure(api)
.configure(back_end)
.configure(back_end2)
//Public
.wrap(
IdentityMiddleware::builder()
.id_key("bestseller_store.user_id")
.last_visit_unix_timestamp_key("bestseller_store.last_visit")
.login_unix_timestamp_key("bestseller_store.login")
.build(),
)
.wrap(
SessionMiddleware::builder(CookieSessionStore::default(), Key::from(&[123; 64]))
.cookie_name("bestseller_store".into())
.build(),
)
.configure(front_end)
});
But I only see the first cookie
stored.
Metadata
Metadata
Assignees
Labels
No labels