Skip to content

Commit

Permalink
Update main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
spectrapulse authored May 27, 2024
1 parent 2bf5072 commit 8d8d82c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ async fn index(req: HttpRequest) -> Result<HttpResponse, Box<dyn Error>> {
return Ok(response.finish());
}

// HealthCheck
if req.method() == Method::GET && req.path().eq("/ping") {
let mut response = HttpResponse::Ok();
add_headers(&mut response);
return Ok(response.finish());
}

// parse query string
let mut query = QString::from(req.query_string());

Expand Down

0 comments on commit 8d8d82c

Please sign in to comment.