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:
@@ -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};
|
||||
Reference in New Issue
Block a user