feat(platform-ops): 增加平台只读统计接口与超管入口
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"hfb_sys/backend/internal/platformscope"
|
||||
"hfb_sys/backend/internal/sitecode"
|
||||
"hfb_sys/backend/internal/tenancy"
|
||||
|
||||
@@ -66,6 +67,10 @@ func SiteDomainFallback(resolver SiteDomainResolver, logger *zap.Logger) gin.Han
|
||||
}
|
||||
cache := newSiteDomainCache()
|
||||
return func(c *gin.Context) {
|
||||
if platformscope.IsScope(c.Request.Context()) {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
if _, ok := tenancy.FromContext(c.Request.Context()); ok || sitecode.HasTenantScope(c.Request.Context()) {
|
||||
c.Next()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user