Skip to content

Commit

Permalink
chore: fix fmt curl example
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanitskiy committed Oct 26, 2023
1 parent 8706830 commit 1e7b0a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/curl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ http_request_handler!(curl_access_handler, |request: &mut http::Request| {

match co.enable {
true => {
if request.user_agent().is_some_and(|ua| ua.as_bytes().starts_with(b"curl")) {
if request
.user_agent()
.is_some_and(|ua| ua.as_bytes().starts_with(b"curl"))
{
http::HTTPStatus::FORBIDDEN.into()
} else {
core::Status::NGX_DECLINED
Expand Down

0 comments on commit 1e7b0a6

Please sign in to comment.