2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 01:48:43 +08:00
Files
panel/app/http/middleware/static.go
2023-06-22 00:09:56 +08:00

17 lines
391 B
Go

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