qa: Try to fix GitLab connection return on live infra

This commit is contained in:
nemunaire 2025-01-13 18:19:32 +01:00
parent 394cb13dae
commit 043c6e4dbe

View File

@ -42,6 +42,14 @@ func NewApp(baseURL string) App {
api.DeclareRoutes(baserouter)
declareStaticRoutes(baserouter, baseURL)
// In case of /baseURL/baseURL, redirect to /baseURL
baserouter.GET(baseURL, func(c *gin.Context) {
c.Redirect(http.StatusFound, baseURL)
})
baserouter.GET(baseURL+"/*path", func(c *gin.Context) {
c.Redirect(http.StatusFound, baseURL+c.Param("path"))
})
} else {
declareStaticRoutes(router.Group(""), "")
}