Compare commits
1 commit
main
...
error-anon
Author | SHA1 | Date | |
---|---|---|---|
914dd0559c |
1 changed files with 3 additions and 3 deletions
|
@ -165,9 +165,9 @@ fn parse_authorization(
|
|||
}
|
||||
|
||||
fn parse_query_authorization(headers: &HashMap<String, String>) -> Result<Authorization, Error> {
|
||||
let algo = headers
|
||||
.get("x-amz-algorithm")
|
||||
.ok_or_bad_request("X-Amz-Algorithm not found in query parameters")?;
|
||||
let algo = headers.get("x-amz-algorithm").ok_or_else(|| {
|
||||
Error::Forbidden("Garage does not support anonymous users yet".to_owned())
|
||||
})?;
|
||||
if algo != "AWS4-HMAC-SHA256" {
|
||||
return Err(Error::BadRequest(
|
||||
"Unsupported authorization method".to_string(),
|
||||
|
|
Loading…
Reference in a new issue