Skip to content

Commit

Permalink
dont listen to /docs
Browse files Browse the repository at this point in the history
  • Loading branch information
theleeeo committed Jan 30, 2024
1 parent c38787f commit 7094837
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ func getCompanyLogo(location string) ([]byte, error) {
}

func registerHandlers(a *App) {
a.fiberApp.Get("/docs/favicon.ico", func(c *fiber.Ctx) error {
a.fiberApp.Get("/favicon.ico", func(c *fiber.Ctx) error {
return c.Send(a.logo)
})

// Serve static files
a.fiberApp.Static("/docs/", staticFilesPath)
a.fiberApp.Static("/", staticFilesPath)

a.fiberApp.Get("/docs/", a.getIndexHandler)
a.fiberApp.Get("/docs/:version/:role", a.renderDocHandler)
a.fiberApp.Get("/", a.getIndexHandler)
a.fiberApp.Get("/:version/:role", a.renderDocHandler)

a.fiberApp.Get("/docs/versions", a.getVersionsHandler)
a.fiberApp.Get("/docs/version/:version/roles", a.getRolesHandler)
a.fiberApp.Get("/versions", a.getVersionsHandler)
a.fiberApp.Get("/version/:version/roles", a.getRolesHandler)
}

func validateConfig(cfg *Config) error {
Expand Down

0 comments on commit 7094837

Please sign in to comment.