mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-06 01:50:25 +08:00
实现WAF统计数据接口
This commit is contained in:
@@ -57,9 +57,18 @@ func ValidateRequest(ctx context.Context, userTypes ...UserType) (userType UserT
|
||||
}
|
||||
|
||||
// 是否是模拟测试
|
||||
mockCtx, isMock := ctx.(*MockNodeContext)
|
||||
if isMock {
|
||||
return UserTypeNode, mockCtx.NodeId, nil
|
||||
{
|
||||
mockCtx, isMock := ctx.(*MockNodeContext)
|
||||
if isMock {
|
||||
return UserTypeNode, mockCtx.NodeId, nil
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
mockCtx, isMock := ctx.(*MockAdminNodeContext)
|
||||
if isMock {
|
||||
return UserTypeAdmin, mockCtx.AdminId, nil
|
||||
}
|
||||
}
|
||||
|
||||
md, ok := metadata.FromIncomingContext(ctx)
|
||||
|
||||
Reference in New Issue
Block a user