Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(auth): remove excessive warning and typo #210

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading