From f8549af8d64b551449957c3004b74ed0bf69c593 Mon Sep 17 00:00:00 2001 From: mo khan Date: Fri, 4 Jul 2025 12:40:38 -0600 Subject: feat: allow access to sparkle homepage --- src/authorization/cedar_authorizer.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/authorization/cedar_authorizer.rs') diff --git a/src/authorization/cedar_authorizer.rs b/src/authorization/cedar_authorizer.rs index f4004247..fd27565d 100644 --- a/src/authorization/cedar_authorizer.rs +++ b/src/authorization/cedar_authorizer.rs @@ -60,6 +60,20 @@ impl Default for CedarAuthorizer { impl Authorizer for CedarAuthorizer { fn authorize(&self, request: CheckRequest) -> bool { + let http_request = match request + .attributes + .as_ref() + .and_then(|attr| attr.request.as_ref()) + .and_then(|req| req.http.as_ref()) + { + Some(http) => http, + None => return false, + }; + + if http_request.path == "/" { + return true; + } + let headers = match request .attributes .as_ref() -- cgit v1.2.3