Set default session cookie name.

This commit is contained in:
2022-06-24 08:22:17 -04:00
parent 94ff8bdfb8
commit d68988b2d4
3 changed files with 13 additions and 7 deletions

View File

@ -20,10 +20,10 @@ async fn main() -> tide::Result<()> {
async fn app_setup() -> tide::Server<()> {
let mut app = tide::new();
app.at("/").get(home);
app.with(SessionMiddleware::new(
MemoryStore::new(),
b"361f953f-56ba-45e6-86ab-9efbf61b745d",
));
app.with(
SessionMiddleware::new(MemoryStore::new(), b"361f953f-56ba-45e6-86ab-9efbf61b745d")
.with_cookie_name("morethantext.sid"),
);
return app;
}