fix: use permissive cors
This commit is contained in:
16
api/Cargo.lock
generated
16
api/Cargo.lock
generated
@@ -19,6 +19,21 @@ dependencies = [
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "actix-cors"
|
||||
version = "0.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "daa239b93927be1ff123eebada5a3ff23e89f0124ccb8609234e5103d5a5ae6d"
|
||||
dependencies = [
|
||||
"actix-utils",
|
||||
"actix-web",
|
||||
"derive_more",
|
||||
"futures-util",
|
||||
"log",
|
||||
"once_cell",
|
||||
"smallvec",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "actix-http"
|
||||
version = "3.11.2"
|
||||
@@ -243,6 +258,7 @@ dependencies = [
|
||||
name = "api"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"actix-cors",
|
||||
"actix-web",
|
||||
"aws-config",
|
||||
"aws-sdk-dynamodb",
|
||||
|
||||
@@ -4,6 +4,7 @@ version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
actix-cors = "0.7.1"
|
||||
actix-web = "4.12.1"
|
||||
aws-config = "1.8.12"
|
||||
aws-sdk-dynamodb = "1.102.0"
|
||||
|
||||
@@ -66,6 +66,7 @@ async fn run() -> std::io::Result<()> {
|
||||
.finish(),
|
||||
)
|
||||
.wrap(tracing_actix_web::TracingLogger::default())
|
||||
.wrap(actix_cors::Cors::permissive())
|
||||
.route(
|
||||
"/",
|
||||
web::get()
|
||||
|
||||
Reference in New Issue
Block a user