gocraft / web

Go Router + Middleware. Your Contexts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rate Limit middleware

fuson opened this issue · comments

Have a idea to protect our production from spam on middleware level, set up X-RateLimit-Limit and X-RateLimit-Remaining and cancel request when rate limit reach. Maybe anybody know good middleware for this?

@fuson Here is some example middlware from Martini: https://github.com/martini-contrib/throttle. It is super easy to port it to gocraft if you want. If you want to host the port, i can link to it from the readme.