forked from MarseyWorld/MarseyWorld
ddos mitigation tweak for WPD
parent
2c2edabf5c
commit
eb5f2723c2
|
@ -77,7 +77,10 @@ def calc_users():
|
|||
loggedout_counter = len(loggedout)
|
||||
|
||||
if get_setting('automatic_DDOS_mitigation'):
|
||||
if loggedout_counter > loggedin_counter:
|
||||
if SITE == 'watchpeopledie.tv': mul = 3
|
||||
else: mul = 1
|
||||
|
||||
if loggedout_counter > (loggedin_counter * mul):
|
||||
if not get_setting('login_required'):
|
||||
toggle_setting('login_required')
|
||||
else:
|
||||
|
|
|
@ -54,9 +54,6 @@ def get_logged_in_user():
|
|||
else:
|
||||
session.pop("lo_user")
|
||||
|
||||
# if SITE == 'devrama.net' and not (v and v.id == 7):
|
||||
# abort(403, "Only Aevann can access devrama for now!")
|
||||
|
||||
if request.method.lower() != "get" and get_setting('read_only_mode') and not (v and v.admin_level >= PERMS['SITE_BYPASS_READ_ONLY_MODE']):
|
||||
abort(403)
|
||||
|
||||
|
|
Loading…
Reference in New Issue