mirror of
https://github.com/acepanel/panel.git
synced 2026-02-05 04:30:13 +08:00
17 lines
364 B
Go
17 lines
364 B
Go
package middleware
|
|
|
|
import (
|
|
"github.com/gin-contrib/static"
|
|
"github.com/goravel/framework/contracts/http"
|
|
"github.com/goravel/gin"
|
|
|
|
"github.com/TheTNB/panel/embed"
|
|
)
|
|
|
|
func Static() http.Middleware {
|
|
return func(ctx http.Context) {
|
|
static.Serve("/", static.EmbedFolder(embed.PublicFS, "frontend"))(ctx.(*gin.Context).Instance())
|
|
ctx.Request().Next()
|
|
}
|
|
}
|