bump actix cors

This commit is contained in:
mpostma 2020-12-09 12:44:02 +01:00
parent d45c794a9e
commit 044dbb0333
3 changed files with 7 additions and 6 deletions

View file

@ -17,7 +17,7 @@ path = "src/main.rs"
default = ["sentry"]
[dependencies]
actix-cors = "0.4.1"
actix-cors = "0.5.3"
actix-http = "2"
actix-rt = "1"
actix-service = "1.0.6"

View file

@ -84,11 +84,10 @@ async fn main() -> Result<(), MainError> {
let http_server = HttpServer::new(move || {
create_app(&data, enable_frontend)
.wrap(
Cors::new()
Cors::default()
.send_wildcard()
.allowed_headers(vec!["content-type", "x-meili-api-key"])
.max_age(86_400) // 24h
.finish(),
)
.wrap(middleware::Logger::default())
.wrap(middleware::Compress::default())