Update Actix crates to latest versions
This avoids a vulnerability in tokio (#3085). The major version updates of both actix-web and actix-rt required some signficant changes. Chief among those, it turns out we were relying on actix-rt to run the HttpServer in a different thread from the rest of the test, so that we could talk to it from sync code in the test thread. This no longer works, so the sync code is now run in a dedicated thread with `actix_rt::task::spawn_blocking`.
This commit is contained in:
committed by
Dustin J. Mitchell
parent
33366e2f05
commit
52fdc6a877
@@ -34,10 +34,9 @@ impl Server {
|
||||
pub fn config(&self, cfg: &mut web::ServiceConfig) {
|
||||
cfg.service(
|
||||
web::scope("")
|
||||
.data(self.server_state.clone())
|
||||
.app_data(web::Data::new(self.server_state.clone()))
|
||||
.wrap(
|
||||
middleware::DefaultHeaders::new()
|
||||
.header("Cache-Control", "no-store, max-age=0"),
|
||||
middleware::DefaultHeaders::new().add(("Cache-Control", "no-store, max-age=0")),
|
||||
)
|
||||
.service(index)
|
||||
.service(api_scope()),
|
||||
|
||||
Reference in New Issue
Block a user