issues
search
casual-simulation
/
casualos
Casual Open Simulation for the Web
https://ab1.bot
MIT License
49
stars
9
forks
source link
Add basic support for rate limiting
#275
Closed
KallynGowdy
closed
1 year ago
KallynGowdy
commented
1 year ago
:rocket: Improvements
Added configurable support for IP-based rate limiting.
Applies to websockets as well as the API.
Requires a Redis connection and is configurable by the following environment variables:
RATE_LIMIT_MAX
- The maximum number of requests that can be recieved from an IP address over the window.
RATE_LIMIT_WINDOW_MS
- The size of the window for requests represented in miliseconds.
If any of the above environment variables are not specified, then rate limiting will be disabled.
:rocket: Improvements
RATE_LIMIT_MAX
- The maximum number of requests that can be recieved from an IP address over the window.RATE_LIMIT_WINDOW_MS
- The size of the window for requests represented in miliseconds.