diff options
| -rw-r--r-- | policies/auth_policy.cedar | 2 | ||||
| -rw-r--r-- | src/authorization/cedar_authorizer.rs | 21 |
2 files changed, 2 insertions, 21 deletions
diff --git a/policies/auth_policy.cedar b/policies/auth_policy.cedar index 27e2bd1b..c7eb6ce5 100644 --- a/policies/auth_policy.cedar +++ b/policies/auth_policy.cedar @@ -20,4 +20,4 @@ when { context.path like "*.gif" || context.path like "*.bmp" || context.path like "*.html") -};
\ No newline at end of file +}; diff --git a/src/authorization/cedar_authorizer.rs b/src/authorization/cedar_authorizer.rs index 577b75ba..19886222 100644 --- a/src/authorization/cedar_authorizer.rs +++ b/src/authorization/cedar_authorizer.rs @@ -179,7 +179,7 @@ mod tests { fn test_cedar_authorizer_allows_static_assets() { let authorizer = CedarAuthorizer::new(); let mut headers = HashMap::new(); - headers.insert(":path".to_string(), "/static/style.css".to_string()); + headers.insert(":path".to_string(), "/public/style.css".to_string()); let request = create_request(|item: &mut HttpRequest| { item.headers = headers; }); @@ -200,23 +200,4 @@ mod tests { let result = authorizer.authorize(request); assert!(result); } - - // test css passthrough - // test javascript passthrough - // test ico passthrough - // test png,jpg,bmp passthrough - // test html passthrough - // #[test] - // fn authorize_test_css_passthrough() { - // let authorizer = CedarAuthorizer::new(); - - // let request = CheckRequest { - // attributes: Some(AttributeContext { - // ..Default::default() - // }), - // }; - // let result = authorizer.authorize(request); - - // assert!(result) - // } } |
