2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 04:30:13 +08:00
Files
panel/app/http/middleware/static.go
2023-09-11 16:54:37 +08:00

18 lines
427 B
Go

package middleware
import (
"github.com/gin-contrib/static"
contractshttp "github.com/goravel/framework/contracts/http"
"github.com/goravel/gin"
"panel/app/services"
)
func Static() contractshttp.Middleware {
return func(ctx contractshttp.Context) {
static.Serve(services.NewSettingImpl().Get("entrance", "/"), static.LocalFile("/www/panel/public", false))(ctx.(*gin.Context).Instance())
ctx.Request().Next()
}
}