mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-02-23 14:36:26 +08:00
do index redirect on client
This commit is contained in:
parent
65a3155131
commit
906e2f477e
2 changed files with 1 additions and 10 deletions
9
main.go
9
main.go
|
@ -2,7 +2,6 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
|
@ -53,14 +52,6 @@ func main() {
|
|||
|
||||
router.Use(gin.ErrorLogger())
|
||||
|
||||
router.Use(func(c *gin.Context) {
|
||||
path := c.Request.URL.Path
|
||||
if path == "" || path == "/" {
|
||||
c.Redirect(http.StatusMovedPermanently, "/my-drive")
|
||||
}
|
||||
c.Next()
|
||||
})
|
||||
|
||||
routes.AddRoutes(router)
|
||||
|
||||
ui.AddRoutes(router)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 7fbdc887c22324943bd39aa6ae681ba709c77be7
|
||||
Subproject commit 8e11e1bac18ea9837cd2b250ad22b1beffff5c94
|
Loading…
Reference in a new issue