Fix cargo clippy issue
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-08-28 08:17:47 +02:00
parent 0dcb86c538
commit 1cdf10d548
2 changed files with 21 additions and 7 deletions

View File

@@ -90,9 +90,8 @@ where
// Check if POST request comes from another website (block invalid origins)
let origin = req.headers().get(header::ORIGIN);
if req.method() == Method::POST && req.path() != TOKEN_URI && req.path() != USERINFO_URI
{
if let Some(o) = origin {
if !o
&& let Some(o) = origin
&& !o
.to_str()
.unwrap_or("bad")
.eq(&AppConfig::get().website_origin)
@@ -104,8 +103,6 @@ where
.map_into_right_body(),
));
}
}
}
if req.path().starts_with("/.git") {
return Ok(req.into_response(