From 1a2bdccf124de6207899f59538cc0ed2efc97b5a Mon Sep 17 00:00:00 2001 From: Simponic Date: Thu, 29 Dec 2022 17:21:20 -0700 Subject: Add scalable nodes and user sessions --- config/config.exs | 6 +++++- config/test.exs | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index 2136a60..c919a33 100644 --- a/config/config.exs +++ b/config/config.exs @@ -3,10 +3,14 @@ import Config config :chessh, ecto_repos: [Chessh.Repo], key_dir: Path.join(Path.dirname(__DIR__), "priv/keys"), - max_password_attempts: 3, port: 42_069, max_sessions: 255 +config :chessh, RateLimits, + jail_timeout_ms: 5 * 60 * 1000, + jail_threshold: 15, + max_concurrent_user_sessions: 5 + config :hammer, backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} diff --git a/config/test.exs b/config/test.exs index db11bb4..bdaf9f1 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,7 +1,8 @@ import Config -config :hammer, - backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} +config :chessh, RateLimits, + jail_timeout_ms: 1000, + jail_threshold: 2 config :chessh, Chessh.Repo, database: "chessh-test", -- cgit v1.2.3-70-g09d2