From 31cb348a6275ff077e66744bdfc8293c93652272 Mon Sep 17 00:00:00 2001 From: ngn Date: Thu, 9 May 2024 19:55:34 +0300 Subject: [PATCH] fix: git redirect --- routes/configs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/configs.go b/routes/configs.go index 73b6902..7dd17c7 100644 --- a/routes/configs.go +++ b/routes/configs.go @@ -131,8 +131,8 @@ func ConfigRoute(c *fiber.Ctx) error{ } for _, cur := range configs { - if cur.Name == name { - return c.Redirect(cur.Redirect) + if cur.Name == name || cur.Name+".git" == name { + return c.Status(301).Redirect(cur.Redirect) } }