fix: url prefix page redirect

This commit is contained in:
engigu
2026-01-13 22:23:53 +08:00
parent 5b600c4aea
commit b7641ab718
-7
View File
@@ -229,13 +229,6 @@ func Setup(c *Controllers) *gin.Engine {
}
}
// 如果配置了前缀,添加重定向:/prefix -> /prefix/
if urlPrefix != "" {
router.GET(urlPrefix, func(ctx *gin.Context) {
ctx.Redirect(301, urlPrefix+"/")
})
}
// SPA fallback - serve index.html (no cache for HTML)
// 必须在最后注册,作为兜底路由
router.NoRoute(func(ctx *gin.Context) {