Rest API - Rate Limiting and Throttling
Identify the bug in this fixed window rate limiter code snippet and select the fix:
limit = 5
window_size = 60
count = 0
window_start = int(time.time())
if int(time.time()) - window_start > window_size:
count = 0
count += 1
if count > limit:
print("Blocked")
else:
print("Allowed")