Merge pull request #823 from Rio/public-health-endpoint

chore(http): do not require auth on /health endpoint
This commit is contained in:
Clément Renault 2020-07-01 17:01:23 +02:00 committed by GitHub
commit 92d9283d1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ pub fn services(cfg: &mut web::ServiceConfig) {
cfg.service(get_health).service(change_healthyness); cfg.service(get_health).service(change_healthyness);
} }
#[get("/health", wrap = "Authentication::Private")] #[get("/health")]
async fn get_health(data: web::Data<Data>) -> Result<HttpResponse, ResponseError> { async fn get_health(data: web::Data<Data>) -> Result<HttpResponse, ResponseError> {
let reader = data.db.main_read_txn()?; let reader = data.db.main_read_txn()?;
if let Ok(Some(_)) = data.db.get_health(&reader) { if let Ok(Some(_)) = data.db.get_health(&reader) {