From 7a63668801c7001e4ff95ff53df800906c37dec9 Mon Sep 17 00:00:00 2001 From: qowevisa Date: Sat, 3 Aug 2024 13:43:58 +0300 Subject: [PATCH] Add redirects --- cmd/http-server/main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/http-server/main.go b/cmd/http-server/main.go index 451f35e..8bfd191 100644 --- a/cmd/http-server/main.go +++ b/cmd/http-server/main.go @@ -54,6 +54,12 @@ func main() { } r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerFiles.Handler)) + r.GET("/swagger", func(c *gin.Context) { + c.Redirect(301, "/swagger/index.html") + }) + r.GET("/docs", func(c *gin.Context) { + c.Redirect(301, "/swagger/index.html") + }) go tokens.StartTokens() r.Run(":3000")