Skip to content

Commit

Permalink
fix(auth): remove excessive warning, typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tessus committed Dec 20, 2023
1 parent f905648 commit e242104
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ pub(crate) async fn extract_tokens(req: &ServiceRequest) -> Result<HashSet<Token
}
} else if token_type == TokenType::Auth {
// not configured `auth_tokens` means that the user is allowed to access the endpoints
warn!("auth_tokens not configured, allowing the request without auth header");
user_tokens.insert(token_type);
} else if token_type == TokenType::Delete && req.method() == Method::DELETE {
// explicitly disable `DELETE` methods if no `delete_tokens` are set
warn!("delete endpoints is not served because there are no delete_tokens set");
warn!("delete endpoint is not served because there are no delete_tokens set");
Err(error::ErrorNotFound(""))?;
}
}
Expand Down

0 comments on commit e242104

Please sign in to comment.