fix: use permissive cors

This commit is contained in:
2026-01-21 08:58:10 -08:00
parent ddf47ff22d
commit 8bce0bd957
3 changed files with 18 additions and 0 deletions

16
api/Cargo.lock generated
View File

@@ -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",

View File

@@ -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"

View File

@@ -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()