mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 16:50:54 +08:00
发布v2.15.1版本,更新内容请查看:https://github.com/bufanyun/hotgo/blob/v2.0/docs/guide-zh-CN/start-update-log.md
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"hotgo/internal/library/token"
|
||||
"hotgo/internal/model"
|
||||
"hotgo/internal/service"
|
||||
"hotgo/utility/simple"
|
||||
"hotgo/utility/validate"
|
||||
"net/http"
|
||||
"strings"
|
||||
@@ -110,8 +111,7 @@ func (s *sMiddleware) CORS(r *ghttp.Request) {
|
||||
|
||||
// DemoLimit 演示系统操作限制
|
||||
func (s *sMiddleware) DemoLimit(r *ghttp.Request) {
|
||||
isDemo := g.Cfg().MustGet(r.Context(), "hotgo.isDemo", false)
|
||||
if !isDemo.Bool() {
|
||||
if !simple.IsDemo(r.Context()) {
|
||||
r.Middleware.Next()
|
||||
return
|
||||
}
|
||||
@@ -157,10 +157,6 @@ func (s *sMiddleware) Addon(r *ghttp.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
if sk.View != nil {
|
||||
r.SetView(sk.View)
|
||||
}
|
||||
|
||||
contexts.SetAddonName(ctx, sk.Name)
|
||||
r.Middleware.Next()
|
||||
}
|
||||
|
Reference in New Issue
Block a user