mirror of
				https://github.com/TeaOSLab/EdgeAPI.git
				synced 2025-11-04 16:00:24 +08:00 
			
		
		
		
	增加PURGE某个URL缓存功能
This commit is contained in:
		@@ -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) {
 | 
					func (this *ServerService) PurgeServerCache(ctx context.Context, req *pb.PurgeServerCacheRequest) (*pb.PurgeServerCacheResponse, error) {
 | 
				
			||||||
	_, err := this.ValidateAdmin(ctx, 0)
 | 
						_, err := this.ValidateAdmin(ctx, 0)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							// 检查是否为节点
 | 
				
			||||||
 | 
							_, err = this.ValidateNode(ctx)
 | 
				
			||||||
 | 
							if err != nil {
 | 
				
			||||||
 | 
								return nil, err
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if len(req.Domains) == 0 {
 | 
						if len(req.Domains) == 0 {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user