summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorTheArcaneBrony <myrainbowdash949@gmail.com>2022-08-24 03:01:57 +0200
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-12-19 19:51:14 +1100
commitda2fe81a8b6b757c79eec653e8481c6c34124344 (patch)
treec9ffd365ddf08b73df5570f0114e3772f85c4573 /src
parentAdded Env and Software Vars. (diff)
downloadserver-da2fe81a8b6b757c79eec653e8481c6c34124344.tar.xz
case insensitive header for rate limits, fix rate limit default settings
Also disabled rate limit bypass right as it doesn't work...
Diffstat (limited to 'src')
-rw-r--r--src/util/config/types/subconfigurations/limits/RateLimits.ts30
-rw-r--r--src/util/config/types/subconfigurations/limits/ratelimits/Route.ts30
2 files changed, 30 insertions, 30 deletions
diff --git a/src/util/config/types/subconfigurations/limits/RateLimits.ts b/src/util/config/types/subconfigurations/limits/RateLimits.ts
index 25e7a1e0..f337af49 100644
--- a/src/util/config/types/subconfigurations/limits/RateLimits.ts
+++ b/src/util/config/types/subconfigurations/limits/RateLimits.ts
@@ -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;
-}
\ No newline at end of file
+	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();
+}
diff --git a/src/util/config/types/subconfigurations/limits/ratelimits/Route.ts b/src/util/config/types/subconfigurations/limits/ratelimits/Route.ts
index 3012a8a8..5d73c2cf 100644
--- a/src/util/config/types/subconfigurations/limits/ratelimits/Route.ts
+++ b/src/util/config/types/subconfigurations/limits/ratelimits/Route.ts
@@ -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
-}
\ No newline at end of file
+	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
+}