From 954babd914f3ebcc495596f3cbf4856448129bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 1 Mar 2022 20:49:11 +0100 Subject: [PATCH] Manager: redirect web root to Swagger UI Temporarily redirect the index page to the Swagger UI, so that at least you can see something other than a "404 Not Found" error. --- cmd/flamenco-manager/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/flamenco-manager/main.go b/cmd/flamenco-manager/main.go index a60cfda6..79a0f9c1 100644 --- a/cmd/flamenco-manager/main.go +++ b/cmd/flamenco-manager/main.go @@ -118,6 +118,12 @@ func buildWebService(flamenco api.ServerInterface, persist api_impl.PersistenceS return c.JSON(http.StatusOK, swagger) }) + // Temporarily redirect the index page to the Swagger UI, so that at least you + // can see something. + e.GET("/", func(c echo.Context) error { + return c.Redirect(http.StatusTemporaryRedirect, "/api/swagger-ui/") + }) + // Log available routes routeLogger := log.Level(zerolog.DebugLevel) routeLogger.Debug().Msg("available routes:")