Use App::configure to set up actix

This avoids the need for the messy cache-control-header macro.
Otherwise, it has no effect.
This commit is contained in:
Dustin J. Mitchell
2021-10-09 17:53:36 -04:00
parent f109056340
commit aaac1c3356
7 changed files with 63 additions and 40 deletions

View File

@@ -59,7 +59,8 @@ mod test {
}
let server = Server::new(storage);
let mut app = test::init_service(App::new().service(server.service())).await;
let app = App::new().configure(|sc| server.config(sc));
let mut app = test::init_service(app).await;
let uri = "/v1/client/snapshot";
let req = test::TestRequest::get()
@@ -94,7 +95,8 @@ mod test {
}
let server = Server::new(storage);
let mut app = test::init_service(App::new().service(server.service())).await;
let app = App::new().configure(|sc| server.config(sc));
let mut app = test::init_service(app).await;
let uri = "/v1/client/snapshot";
let req = test::TestRequest::get()