Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
itegulov committed Dec 18, 2024
1 parent b096f94 commit 88f18e4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ async fn build_json_http(
// CORS relies on browsers respecting server's access list response headers.
// See [`tower_http::cors`](https://docs.rs/tower-http/latest/tower_http/cors/index.html)
// for more details.
let cors_layer = CorsLayer::new()
CorsLayer::new()
.allow_origin(AllowOrigin::exact(
cors_allow_origin.parse().expect("malformed allow origin"),
))
.allow_headers([http::header::CONTENT_TYPE])
.allow_methods([Method::GET, Method::POST]);
cors_layer
.allow_methods([Method::GET, Method::POST])
}));
let health_api_layer = tower::util::option_layer(if enable_health_api {
Some(ProxyGetRequestLayer::new("/health", "web3_clientVersion").unwrap())
Expand Down

0 comments on commit 88f18e4

Please sign in to comment.