aboutsummaryrefslogtreecommitdiff
path: root/src/api/api_server.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/api_server.rs')
-rw-r--r--src/api/api_server.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/api_server.rs b/src/api/api_server.rs
index b34030fd..b064ac24 100644
--- a/src/api/api_server.rs
+++ b/src/api/api_server.rs
@@ -91,6 +91,9 @@ async fn handler(
async fn handler_inner(garage: Arc<Garage>, req: Request<Body>) -> Result<Response<Body>, Error> {
let (api_key, content_sha256) = check_payload_signature(&garage, &req).await?;
+ let api_key = api_key.ok_or_else(|| {
+ Error::Forbidden("Garage does not support anonymous access yet".to_string())
+ })?;
let authority = req
.headers()