瀏覽代碼

Pass status checks for AWS load balancer

Mark Rousskov 5 年之前
父節點
當前提交
d10faa7f10
共有 1 個文件被更改,包括 6 次插入0 次删除
  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)