mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
refactor: migrate to new cosy
This commit is contained in:
parent
6082aef5d5
commit
33a996e777
111 changed files with 1163 additions and 1772 deletions
|
@ -19,14 +19,13 @@ import (
|
|||
"github.com/0xJacky/Nginx-UI/internal/middleware"
|
||||
"github.com/gin-contrib/static"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/uozi-tech/cosy"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func InitRouter() *gin.Engine {
|
||||
r := gin.New()
|
||||
func InitRouter() {
|
||||
r := cosy.GetEngine()
|
||||
r.Use(
|
||||
gin.Logger(),
|
||||
middleware.Recovery(),
|
||||
middleware.CacheJs(),
|
||||
middleware.IPWhiteList(),
|
||||
static.Serve("/", middleware.MustFs("")),
|
||||
|
@ -78,6 +77,4 @@ func InitRouter() *gin.Engine {
|
|||
system.InitWebSocketRouter(w)
|
||||
}
|
||||
}
|
||||
|
||||
return r
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue