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",
|
"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]]
|
[[package]]
|
||||||
name = "actix-http"
|
name = "actix-http"
|
||||||
version = "3.11.2"
|
version = "3.11.2"
|
||||||
@@ -243,6 +258,7 @@ dependencies = [
|
|||||||
name = "api"
|
name = "api"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"actix-cors",
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"aws-config",
|
"aws-config",
|
||||||
"aws-sdk-dynamodb",
|
"aws-sdk-dynamodb",
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ version = "0.1.0"
|
|||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
actix-cors = "0.7.1"
|
||||||
actix-web = "4.12.1"
|
actix-web = "4.12.1"
|
||||||
aws-config = "1.8.12"
|
aws-config = "1.8.12"
|
||||||
aws-sdk-dynamodb = "1.102.0"
|
aws-sdk-dynamodb = "1.102.0"
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ async fn run() -> std::io::Result<()> {
|
|||||||
.finish(),
|
.finish(),
|
||||||
)
|
)
|
||||||
.wrap(tracing_actix_web::TracingLogger::default())
|
.wrap(tracing_actix_web::TracingLogger::default())
|
||||||
|
.wrap(actix_cors::Cors::permissive())
|
||||||
.route(
|
.route(
|
||||||
"/",
|
"/",
|
||||||
web::get()
|
web::get()
|
||||||
|
|||||||
Reference in New Issue
Block a user