diff options
author | Alex <alex@adnab.me> | 2023-01-19 12:33:16 +0000 |
---|---|---|
committer | Alex <alex@adnab.me> | 2023-01-19 12:33:16 +0000 |
commit | aff9c264c8455180bc4459c20ec2368d5aad0ddf (patch) | |
tree | e7826111dae435dd3d6c8051f818114f6ef983a4 /src/api/admin/router.rs | |
parent | fcc5033466e58e3beec05ee7748d33522b6b32b0 (diff) | |
parent | 4962b88f8bf40d839863ca39ede6de7aef3a4992 (diff) | |
download | garage-aff9c264c8455180bc4459c20ec2368d5aad0ddf.tar.gz garage-aff9c264c8455180bc4459c20ec2368d5aad0ddf.zip |
Merge pull request 'Implemented website hosting authorization endpoint.' (#474) from jpds/garage:bucket-serving-validator into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/474
Diffstat (limited to 'src/api/admin/router.rs')
-rw-r--r-- | src/api/admin/router.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/api/admin/router.rs b/src/api/admin/router.rs index 62e6abc3..0dcb1546 100644 --- a/src/api/admin/router.rs +++ b/src/api/admin/router.rs @@ -17,6 +17,7 @@ router_match! {@func #[derive(Debug, Clone, PartialEq, Eq)] pub enum Endpoint { Options, + CheckWebsiteEnabled, Health, Metrics, GetClusterStatus, @@ -91,6 +92,7 @@ impl Endpoint { let res = router_match!(@gen_path_parser (req.method(), path, query) [ OPTIONS _ => Options, + GET "/check" => CheckWebsiteEnabled, GET "/health" => Health, GET "/metrics" => Metrics, GET "/v0/status" => GetClusterStatus, @@ -136,6 +138,7 @@ impl Endpoint { pub fn authorization_type(&self) -> Authorization { match self { Self::Health => Authorization::None, + Self::CheckWebsiteEnabled => Authorization::None, Self::Metrics => Authorization::MetricsToken, _ => Authorization::AdminToken, } |