Fix log spam: move health endpoint before logger (#44)
Co-authored-by: lewisakura <lewi@lewisakura.moe>
This commit is contained in:
@@ -144,6 +144,11 @@ func main() {
|
|||||||
ExposeHeaders: "ETag",
|
ExposeHeaders: "ETag",
|
||||||
AllowOrigins: "https://discord.com,https://ptb.discord.com,https://canary.discord.com,https://discordapp.com,https://ptb.discordapp.com,https://canary.discordapp.com",
|
AllowOrigins: "https://discord.com,https://ptb.discord.com,https://canary.discord.com,https://discordapp.com,https://ptb.discordapp.com,https://canary.discordapp.com",
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
// Add the docker health endpoint before the logger middleware, such that
|
||||||
|
// it doesn't spam the logs full with it
|
||||||
|
app.Get("/v1", routes.GET)
|
||||||
|
|
||||||
app.Use(logger.New())
|
app.Use(logger.New())
|
||||||
|
|
||||||
// #region settings
|
// #region settings
|
||||||
@@ -164,8 +169,6 @@ func main() {
|
|||||||
app.Delete("/v1", requireAuth, routes.DELETE)
|
app.Delete("/v1", requireAuth, routes.DELETE)
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
app.Get("/v1", routes.GET)
|
|
||||||
|
|
||||||
app.Get("/", func(c *fiber.Ctx) error {
|
app.Get("/", func(c *fiber.Ctx) error {
|
||||||
return c.Redirect(g.ROOT_REDIRECT, 303)
|
return c.Redirect(g.ROOT_REDIRECT, 303)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user