Sfoglia il codice sorgente

Pass status checks for AWS load balancer

Mark Rousskov 5 anni fa
parent
commit
d10faa7f10
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      src/main.rs

+ 6 - 0
src/main.rs

@@ -16,6 +16,12 @@ mod logger;
 async fn serve_req(req: Request<Body>, ctx: Arc<Context>) -> Result<Response<Body>, hyper::Error> {
     log::info!("request = {:?}", req);
     let (req, body_stream) = req.into_parts();
+    if req.uri.path() == "/" {
+        return Ok(Response::builder()
+            .status(StatusCode::OK)
+            .body(Body::from("Triagebot is awaiting triage."))
+            .unwrap());
+    }
     if req.uri.path() != "/github-hook" {
         return Ok(Response::builder()
             .status(StatusCode::NOT_FOUND)