mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 10:25:52 +02:00
feat: build with no embedded front-end files
This commit is contained in:
parent
b090564a34
commit
a560d98acf
10 changed files with 91 additions and 35 deletions
17
router/routers_embed.go
Normal file
17
router/routers_embed.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
//go:build !unembed
|
||||
|
||||
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(),
|
||||
middleware.IPWhiteList(),
|
||||
static.Serve("/", middleware.MustFs("")),
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue