fix CORS config error in actix

This commit is contained in:
mpostma 2020-05-29 22:16:42 +02:00
parent 6add10b18f
commit 0ebf7b6214

View File

@ -69,8 +69,8 @@ async fn main() -> Result<(), MainError> {
.wrap(
Cors::new()
.send_wildcard()
.allowed_header("x-meili-api-key")
//.max_age(86_400) // 24h
.allowed_headers(vec!["content-type","x-meili-api-key"])
.max_age(86_400) // 24h
.finish(),
)
.wrap(middleware::Logger::default())