You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can add the seperate router with web::Scope for do authorization with cookies, here an example:
use actix_web::{web,Scope};externcrate dummyctrl;// that code will create a seperate router in your server acts like seperate website, it also has seperate cookies for it's base path:pubfndummy_router() -> Scope{// take the controllers from whenever you want
web::scope("/dummy").route("", web::get().to(dummyctrl::dummy_controller))// this is for "/dummy" route.route("/", web::get().to(dummyctrl::dummy_controller))// and this for "/dummy/" router.route("/dummy2", web::get().to(dummyctrl::dummy_controller_2))// and so on}
add that router to your server with .service() method. Then you can check the cookie value and do whatever you want by depending on that value.
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:
But I only see the first
cookie
stored.The text was updated successfully, but these errors were encountered: