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
Hi, i have a question. In actix-web's middlewares, as i saw, if you add cookies with that api:
res.response_mut().add_cookie(&refreshed_cookie).unwrap();// the refreshed_cookie has the type of "Cookie<'c>"
It would apply that cookies seperately both main router, sub routers and even served directories for file. Even if you weren't specifically add it for that path's. To be more clear:
// that's main route, that took a cookie:App::new()// that kind of services also take cookies seperately:.service(actix_files::Files::new("/css","./pagemodels/templates/css").prefer_utf8(true))// if a service includes web::Scope it also take seperate cookies, this time the path of that cookie is the base path of that scope:.service(routers::blabla_router())
It happens both if you add middlewares with .from_fn() and .wrap_fn().
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, i have a question. In actix-web's middlewares, as i saw, if you add cookies with that api:
It would apply that cookies seperately both main router, sub routers and even served directories for file. Even if you weren't specifically add it for that path's. To be more clear:
It happens both if you add middlewares with
.from_fn()
and.wrap_fn()
.Is that an intended behavior or is that a bug?
Beta Was this translation helpful? Give feedback.
All reactions