Redo ip bans - reduce amount of db queries on login

Works by loading all ip bans on startup and querying the collection in memory
rather than making calls on every login.
This commit is contained in:
P0nk
2024-09-30 07:18:01 +02:00
parent 167937bb88
commit 7661cd0f75
15 changed files with 228 additions and 36 deletions

View File

@@ -0,0 +1,8 @@
CREATE TABLE ip_ban
(
ip varchar(15) NOT NULL,
account_id integer,
created_at timestamp DEFAULT now() NOT NULL,
PRIMARY KEY (ip)
);
GRANT SELECT, INSERT ON TABLE ip_ban TO ${server-username};