More lints

This commit is contained in:
Andras Schmelczer 2024-12-18 22:27:25 +00:00
parent 1e1dd7b877
commit 2d5c91a5ef
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
7 changed files with 27 additions and 20 deletions

View file

@ -70,7 +70,7 @@ pub async fn create_server(app_state: AppState) -> Result<()> {
))
.layer(
CorsLayer::new()
.allow_origin("*".parse::<HeaderValue>().unwrap())
.allow_origin("*".parse::<HeaderValue>().expect("Failed to parse origin"))
.allow_headers([http::header::CONTENT_TYPE, http::header::AUTHORIZATION])
.allow_methods([Method::GET, Method::POST, Method::PUT, Method::DELETE]),
)