mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
refactor: update static file serving middleware to improve functionality
This commit is contained in:
parent
ae16ca4139
commit
98a4708a8c
2 changed files with 24 additions and 7 deletions
|
@ -4,12 +4,11 @@ package router
|
|||
|
||||
import (
|
||||
"github.com/0xJacky/Nginx-UI/internal/middleware"
|
||||
"github.com/gin-contrib/static"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func initEmbedRoute(r *gin.Engine) {
|
||||
r.Use(middleware.CacheJs())
|
||||
|
||||
r.Use(static.Serve("/", middleware.MustFs("")))
|
||||
r.Use(middleware.ServeStatic()...)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue