fix: add cors option http
CI / Rust CI (push) Successful in 2m8s
Publish & Deploy / Build and Push to Registry (push) Successful in 28s
Publish & Deploy / Deploy via SSH (push) Successful in 17s

This commit is contained in:
2026-05-07 20:12:24 +02:00
parent d7ab571bbe
commit 7b98fab2c8
+7 -1
View File
@@ -55,7 +55,13 @@ async fn main() {
let cors = CorsLayer::new() let cors = CorsLayer::new()
.allow_origin(cors_origin.parse::<HeaderValue>().unwrap()) .allow_origin(cors_origin.parse::<HeaderValue>().unwrap())
.allow_methods([Method::GET, Method::POST, Method::PUT, Method::DELETE]) .allow_methods([
Method::GET,
Method::POST,
Method::PUT,
Method::DELETE,
Method::OPTIONS,
])
.allow_headers([ .allow_headers([
header::CONTENT_TYPE, header::CONTENT_TYPE,
header::AUTHORIZATION, header::AUTHORIZATION,