Ignore localhost during API limits check.
This commit is contained in:
		
							parent
							
								
									e5cbdf9765
								
							
						
					
					
						commit
						35b2feaaf1
					
				@ -50,6 +50,9 @@ public class HostRequestIntervalRegistry {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public long tick(String clientHostId) {
 | 
			
		||||
        if ("localhost".equals(clientHostId) || "127.0.0.1".equals(clientHostId)) {
 | 
			
		||||
            return 0;
 | 
			
		||||
        }
 | 
			
		||||
        IntervalCount intervalCount = hostCounts.computeIfAbsent(clientHostId, s -> new IntervalCount(intervalDurationMs));
 | 
			
		||||
        return intervalCount.resetIfExpiredAndTick();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user