1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00

fix: redis URL

This commit is contained in:
Rob Ede 2024-05-25 04:00:56 +01:00
parent f03f126d4f
commit d066747672
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933

View File

@ -81,7 +81,9 @@ async fn main() -> std::io::Result<()> {
// authentication cookies for any user!
let private_key = actix_web::cookie::Key::generate();
let store = RedisSessionStore::new("127.0.0.1:6379").await.unwrap();
let store = RedisSessionStore::new("redis://127.0.0.1:6379")
.await
.unwrap();
HttpServer::new(move || {
App::new()
@ -108,7 +110,10 @@ mod test {
#[actix_web::test]
async fn test_workflow() {
let private_key = actix_web::cookie::Key::generate();
let store = RedisSessionStore::new("127.0.0.1:6379").await.unwrap();
let store = RedisSessionStore::new("redis://127.0.0.1:6379")
.await
.unwrap();
let srv = actix_test::start(move || {
App::new()
.wrap(