sam
b47ed7b699
the /users/{id} prefix contains most API routes so it's not a good idea to put a single rate limit on *all* of them combined. the rate limiter will now ignore the /users/{id} prefix *if* there's a second {id} parameter in the URL. also, X-RateLimit-Bucket is no longer hashed, so it can be directly decoded by clients to get the actual bucket name. i'm not sure if this will actually be useful, but it's nice to have the option. |
||
---|---|---|
.. | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
handler.go | ||
main.go | ||
proxy-config.example.json | ||
rate_limiter.go | ||
README.md |
Rate limiting proxy
This is a service that's meant to sit between nginx (or another reverse proxy) and Foxnouns.Backend.
To configure, copy proxy-config.example.json
to your working directory, rename it to proxy-config.json
,
and change any keys you need to.
Build with go build -v .
and run with ./rate