fix mime type

This commit is contained in:
divyam234 2023-09-10 17:47:08 +05:30
parent 1f2b4da9c6
commit 9af09dc811
2 changed files with 4 additions and 1 deletions

View file

@ -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)

View file

@ -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) {