From 14a6ba79d052894efc86f7cdde72c4e47155fe8d Mon Sep 17 00:00:00 2001 From: RuhNet Date: Thu, 21 Apr 2022 16:45:38 -0400 Subject: [PATCH] Added empty response for requests to / --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 6050e42..dc27178 100644 --- a/main.go +++ b/main.go @@ -224,6 +224,7 @@ func main() { ///////////////////////////////////////////// // ROUTES: + e.GET("/", nothingResponse) e.HEAD("/", uptimeCheck) e.HEAD("/up", uptimeCheck) e.GET("/up", uptimeCheck) @@ -793,6 +794,10 @@ func uptime() UpOut { ///////////////////////////////////////////// ///// API ROUTE FUNCTIONS ///////////////////////////////////////////// +func nothingResponse(c echo.Context) error { + return c.NoContent(http.StatusNotFound) +} + func uptimeCheck(c echo.Context) error { if c.Request().Method == http.MethodHead { return c.NoContent(http.StatusOK)