Skip to content

Commit c552bcf

Browse files
committed
chore: don't hit redis for unknown paths
1 parent b54d95c commit c552bcf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/labrinth/src/util/ratelimit.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ pub async fn rate_limit_middleware(
222222
.expect("Rate limiter not configured properly")
223223
.clone();
224224

225-
if req.path() == "/healthz" {
225+
if req.path() == "/healthz" || req.match_pattern().is_none() {
226226
return Ok(next.call(req).await?.map_into_left_body());
227227
}
228228

0 commit comments

Comments
 (0)