mirror of
https://github.com/tgdrive/teldrive.git
synced 2025-02-22 14:03:37 +08:00
fix mime type
This commit is contained in:
parent
1f2b4da9c6
commit
9af09dc811
2 changed files with 4 additions and 1 deletions
3
main.go
3
main.go
|
@ -2,6 +2,7 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"mime"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
|
@ -50,6 +51,8 @@ func main() {
|
|||
MaxAge: 12 * time.Hour,
|
||||
}))
|
||||
|
||||
mime.AddExtensionType(".js", "application/javascript")
|
||||
|
||||
router.Use(gin.ErrorLogger())
|
||||
|
||||
routes.AddRoutes(router)
|
||||
|
|
2
ui/ui.go
2
ui/ui.go
|
@ -12,7 +12,7 @@ import (
|
|||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
//go:embed teldrive-ui/dist
|
||||
//go:embed all:teldrive-ui/dist
|
||||
var staticFS embed.FS
|
||||
|
||||
func AddRoutes(router gin.IRouter) {
|
||||
|
|
Loading…
Reference in a new issue