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
374e8e8745
commit
da2fe81a8b
@ -1,18 +1,18 @@
|
|||||||
import { RouteRateLimit, RateLimitOptions } from ".";
|
import { RouteRateLimit, RateLimitOptions } from ".";
|
||||||
|
|
||||||
export class RateLimits {
|
export class RateLimits {
|
||||||
disabled: boolean = true;
|
disabled: boolean = true;
|
||||||
ip: Omit<RateLimitOptions, "bot_count"> = {
|
ip: Omit<RateLimitOptions, "bot_count"> = {
|
||||||
count: 500,
|
count: 500,
|
||||||
window: 5
|
window: 5
|
||||||
};
|
};
|
||||||
global: RateLimitOptions = {
|
global: RateLimitOptions = {
|
||||||
count: 250,
|
count: 250,
|
||||||
window: 5
|
window: 5
|
||||||
};
|
};
|
||||||
error: RateLimitOptions = {
|
error: RateLimitOptions = {
|
||||||
count: 10,
|
count: 10,
|
||||||
window: 5
|
window: 5
|
||||||
};
|
};
|
||||||
routes: RouteRateLimit;
|
routes: RouteRateLimit = new RouteRateLimit();
|
||||||
}
|
}
|
||||||
|
@ -2,18 +2,18 @@ import { AuthRateLimit } from ".";
|
|||||||
import { RateLimitOptions } from "./RateLimitOptions";
|
import { RateLimitOptions } from "./RateLimitOptions";
|
||||||
|
|
||||||
export class RouteRateLimit {
|
export class RouteRateLimit {
|
||||||
guild: RateLimitOptions = {
|
guild: RateLimitOptions = {
|
||||||
count: 5,
|
count: 5,
|
||||||
window: 5
|
window: 5
|
||||||
};
|
};
|
||||||
webhook: RateLimitOptions = {
|
webhook: RateLimitOptions = {
|
||||||
count: 10,
|
count: 10,
|
||||||
window: 5
|
window: 5
|
||||||
};
|
};
|
||||||
channel: RateLimitOptions = {
|
channel: RateLimitOptions = {
|
||||||
count: 10,
|
count: 10,
|
||||||
window: 5
|
window: 5
|
||||||
};
|
};
|
||||||
auth: AuthRateLimit;
|
auth: AuthRateLimit = new AuthRateLimit();
|
||||||
// TODO: rate limit configuration for all routes
|
// TODO: rate limit configuration for all routes
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user