allow enabling under attack mode manually

master
Aevann 2023-09-08 16:00:11 +03:00
parent 44691792a4
commit 05c262517e
1 changed files with 3 additions and 8 deletions

View File

@ -60,14 +60,9 @@ def calc_users():
else: else:
ddos_threshold = 1000 ddos_threshold = 1000
if g.loggedout_counter > ddos_threshold: if g.loggedout_counter > ddos_threshold and not get_setting('under_attack'):
if not get_setting('under_attack'): toggle_setting('under_attack')
toggle_setting('under_attack') set_security_level('under_attack')
set_security_level('under_attack')
else:
if get_setting('under_attack'):
toggle_setting('under_attack')
set_security_level('high')
return '' return ''
def get_logged_in_user(): def get_logged_in_user():