Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
// Copyright 2024 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
package portal
import (
"github.com/TeaOSLab/EdgeUser/internal/configloaders"
"github.com/iwind/TeaGo/actions"
"net/http"
)
type Helper struct {
}
func (this *Helper) BeforeAction(action *actions.ActionObject) (goNext bool) {
uiConfig, _ := configloaders.LoadUIConfig()
if uiConfig != nil {
goNext = uiConfig.Portal.IsOn
}
if !goNext {
action.ResponseWriter.WriteHeader(http.StatusNotFound)
_, _ = action.ResponseWriter.Write([]byte("page not found '" + action.Request.URL.String() + "'"))
}
return
}