增加PURGE某个URL缓存功能

This commit is contained in:
GoEdgeLab
2021-10-17 20:22:14 +08:00
parent f8da08f5e9
commit dc15e336c2

View File

@@ -1565,7 +1565,11 @@ func (this *ServerService) FindNearbyServers(ctx context.Context, req *pb.FindNe
func (this *ServerService) PurgeServerCache(ctx context.Context, req *pb.PurgeServerCacheRequest) (*pb.PurgeServerCacheResponse, error) {
_, err := this.ValidateAdmin(ctx, 0)
if err != nil {
return nil, err
// 检查是否为节点
_, err = this.ValidateNode(ctx)
if err != nil {
return nil, err
}
}
if len(req.Domains) == 0 {