fix
This commit is contained in:
@@ -218,6 +218,12 @@ func (s *ApiApplicationServiceImpl) validateApiCall(ctx context.Context, cmd *co
|
|||||||
return nil, ErrFrozenAccount
|
return nil, ErrFrozenAccount
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 验证产品是否启用
|
||||||
|
if !product.IsEnabled {
|
||||||
|
s.logger.Error("产品未启用", zap.String("product_code", product.Code))
|
||||||
|
return nil, ErrProductDisabled
|
||||||
|
}
|
||||||
|
|
||||||
// 4. 验证IP白名单(非开发环境)
|
// 4. 验证IP白名单(非开发环境)
|
||||||
if !s.config.App.IsDevelopment() && !cmd.Options.IsDebug {
|
if !s.config.App.IsDevelopment() && !cmd.Options.IsDebug {
|
||||||
if !apiUser.IsWhiteListed(cmd.ClientIP) {
|
if !apiUser.IsWhiteListed(cmd.ClientIP) {
|
||||||
|
|||||||
Reference in New Issue
Block a user