nand2 / libvmod-throttle

Varnish: Reject or delay requests after given tresholds are reached. (Think API rate limit, or per-ip MISS rate limit)
Other
100 stars 22 forks source link

Function to retrieve remaining requests #2

Closed syphernl closed 11 years ago

syphernl commented 11 years ago

It would be nice if there was a function that returns the amount of requests for the given timeframe, so this can be added to a response header for easy implementation.

nand2 commented 11 years ago

Good idea. I'll add that this WE.

syphernl commented 11 years ago

Thanks! Loving this vmod btw, I'm using it to ratelimit my API.

nand2 commented 11 years ago

Great! You're then my first production user :) Tell me if you have issues.

nand2 commented 11 years ago

Ok it's available.