mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 10:22:39 +01:00
case insensitive header for rate limits, fix rate limit default settings
Also disabled rate limit bypass right as it doesn't work...
This commit is contained in:
parent
f659be2cd0
commit
9fc4d4bd5e
@ -1,18 +1,18 @@
|
||||
import { RouteRateLimit, RateLimitOptions } from ".";
|
||||
|
||||
export class RateLimits {
|
||||
disabled: boolean = true;
|
||||
ip: Omit<RateLimitOptions, "bot_count"> = {
|
||||
count: 500,
|
||||
window: 5
|
||||
};
|
||||
global: RateLimitOptions = {
|
||||
count: 250,
|
||||
window: 5
|
||||
};
|
||||
error: RateLimitOptions = {
|
||||
count: 10,
|
||||
window: 5
|
||||
};
|
||||
routes: RouteRateLimit;
|
||||
}
|
||||
disabled: boolean = true;
|
||||
ip: Omit<RateLimitOptions, "bot_count"> = {
|
||||
count: 500,
|
||||
window: 5
|
||||
};
|
||||
global: RateLimitOptions = {
|
||||
count: 250,
|
||||
window: 5
|
||||
};
|
||||
error: RateLimitOptions = {
|
||||
count: 10,
|
||||
window: 5
|
||||
};
|
||||
routes: RouteRateLimit = new RouteRateLimit();
|
||||
}
|
||||
|
@ -2,18 +2,18 @@ import { AuthRateLimit } from ".";
|
||||
import { RateLimitOptions } from "./RateLimitOptions";
|
||||
|
||||
export class RouteRateLimit {
|
||||
guild: RateLimitOptions = {
|
||||
count: 5,
|
||||
window: 5
|
||||
};
|
||||
webhook: RateLimitOptions = {
|
||||
count: 10,
|
||||
window: 5
|
||||
};
|
||||
channel: RateLimitOptions = {
|
||||
count: 10,
|
||||
window: 5
|
||||
};
|
||||
auth: AuthRateLimit;
|
||||
// TODO: rate limit configuration for all routes
|
||||
}
|
||||
guild: RateLimitOptions = {
|
||||
count: 5,
|
||||
window: 5
|
||||
};
|
||||
webhook: RateLimitOptions = {
|
||||
count: 10,
|
||||
window: 5
|
||||
};
|
||||
channel: RateLimitOptions = {
|
||||
count: 10,
|
||||
window: 5
|
||||
};
|
||||
auth: AuthRateLimit = new AuthRateLimit();
|
||||
// TODO: rate limit configuration for all routes
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user