hyperobject / crossorigin.me

A CORS proxy for everyone.
http://crossorigin.me
MIT License
679 stars 132 forks source link

Restrict size of responses #31

Closed hyperobject closed 8 years ago

hyperobject commented 8 years ago

Several people have been overusing/abusing the service by downloading >1MB files every second, leading to a 6TB bandwidth usage in January. I'm thinking that the best way to deal with this is to restrict the size of files passed through the proxy (which might also help prevent pirating uses of the proxy, which I don't want).

However, I have no clue how to code this restriction - anyone have any ideas?

towerofnix commented 8 years ago

And/or maybe limit the amount of data that can be retrieved from a single IP address (or possibly IPs that are in approximately the same location?) in 10 minutes (or an hour, or whatever)?

Preventing large responses shouldn't be tooooo hard, maybe kill the connection (or just stop receiving data) when the response size is too large?

towerofnix commented 8 years ago

Is this resolved?

hyperobject commented 8 years ago

Yeah. On Mar 7, 2016 4:46 AM, "Liam" notifications@github.com wrote:

Is this resolved?

— Reply to this email directly or view it on GitHub https://github.com/technoboy10/crossorigin.me/issues/31#issuecomment-193217917 .