Revert "allow enabling under attack mode manually"

This reverts commit 05c262517e.
pull/210/head
Aevann 2023-09-26 22:48:30 +03:00
parent 7b960d8809
commit f6a862af07
1 changed files with 8 additions and 3 deletions

View File

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