Foxnouns.NET/rate
sam b47ed7b699
rate limit tweaks
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.
2024-12-02 16:13:56 +01:00
..
Dockerfile feat: add docker configuration 2024-09-14 18:07:49 +02:00
go.mod feat: add docker configuration 2024-09-14 18:07:49 +02:00
go.sum feat: add docker configuration 2024-09-14 18:07:49 +02:00
handler.go feat(rate): add customizable X-Powered-By header 2024-09-10 18:49:25 +02:00
main.go feat: add docker configuration 2024-09-14 18:07:49 +02:00
proxy-config.example.json feat(rate): add customizable X-Powered-By header 2024-09-10 18:49:25 +02:00
rate_limiter.go rate limit tweaks 2024-12-02 16:13:56 +01:00
README.md feat: add rate limiter proxy 2024-09-10 16:53:43 +02:00

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