mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-27 07:14:26 +01:00
bump actix cors
This commit is contained in:
parent
d45c794a9e
commit
044dbb0333
8
Cargo.lock
generated
8
Cargo.lock
generated
@ -40,14 +40,16 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "actix-cors"
|
name = "actix-cors"
|
||||||
version = "0.4.1"
|
version = "0.5.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f3e5c769e4d332bfad27f11b8139b5818c4bbddb02c385b8f16344d93ff1a8eb"
|
checksum = "3f3a3d5493dbc9b8769fe88c030d057ef8d2edc5728e5e26267780e8fc5db0be"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-service",
|
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"derive_more",
|
"derive_more",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
"log",
|
||||||
|
"once_cell",
|
||||||
|
"tinyvec 1.0.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -17,7 +17,7 @@ path = "src/main.rs"
|
|||||||
default = ["sentry"]
|
default = ["sentry"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-cors = "0.4.1"
|
actix-cors = "0.5.3"
|
||||||
actix-http = "2"
|
actix-http = "2"
|
||||||
actix-rt = "1"
|
actix-rt = "1"
|
||||||
actix-service = "1.0.6"
|
actix-service = "1.0.6"
|
||||||
|
@ -84,11 +84,10 @@ async fn main() -> Result<(), MainError> {
|
|||||||
let http_server = HttpServer::new(move || {
|
let http_server = HttpServer::new(move || {
|
||||||
create_app(&data, enable_frontend)
|
create_app(&data, enable_frontend)
|
||||||
.wrap(
|
.wrap(
|
||||||
Cors::new()
|
Cors::default()
|
||||||
.send_wildcard()
|
.send_wildcard()
|
||||||
.allowed_headers(vec!["content-type", "x-meili-api-key"])
|
.allowed_headers(vec!["content-type", "x-meili-api-key"])
|
||||||
.max_age(86_400) // 24h
|
.max_age(86_400) // 24h
|
||||||
.finish(),
|
|
||||||
)
|
)
|
||||||
.wrap(middleware::Logger::default())
|
.wrap(middleware::Logger::default())
|
||||||
.wrap(middleware::Compress::default())
|
.wrap(middleware::Compress::default())
|
||||||
|
Loading…
Reference in New Issue
Block a user