Skip to content

Commit 1e7b0a6

Browse files
committed
chore: fix fmt curl example
1 parent 8706830 commit 1e7b0a6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/curl.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ http_request_handler!(curl_access_handler, |request: &mut http::Request| {
111111

112112
match co.enable {
113113
true => {
114-
if request.user_agent().is_some_and(|ua| ua.as_bytes().starts_with(b"curl")) {
114+
if request
115+
.user_agent()
116+
.is_some_and(|ua| ua.as_bytes().starts_with(b"curl"))
117+
{
115118
http::HTTPStatus::FORBIDDEN.into()
116119
} else {
117120
core::Status::NGX_DECLINED

0 commit comments

Comments
 (0)