Workaround for #10

This commit is contained in:
Lennart
2025-01-04 16:10:07 +01:00
parent f406b7dbb2
commit 577091cf02
5 changed files with 6 additions and 28 deletions

View File

@@ -48,5 +48,5 @@ pub fn make_app<AS: AddressbookStore + ?Sized, CS: CalendarStore + ?Sized>(
frontend_config,
)
}))
.service(web::redirect("/", "/frontend").see_other())
// .service(web::redirect("/", "/frontend").see_other())
}

View File

@@ -1,4 +1,5 @@
use crate::config::Config;
use actix_web::http::KeepAlive;
use actix_web::HttpServer;
use anyhow::Result;
use app::make_app;
@@ -75,6 +76,10 @@ async fn main() -> Result<()> {
)
})
.bind((config.http.host, config.http.port))?
// Workaround for a weird bug where
// new requests might timeout since they cannot properly reuse the connection
// https://github.com/lennart-k/rustical/issues/10
.keep_alive(KeepAlive::Disabled)
.run()
.await?;
}