forked from MarseyWorld/MarseyWorld
remove proxies from cloudflare
parent
338726f225
commit
7e4e98887b
|
@ -429,7 +429,7 @@ def admin_home(v):
|
|||
|
||||
if v.admin_level > 2:
|
||||
if CF_ZONE == 'blahblahblah': response = 'high'
|
||||
else: response = requests.get(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS, timeout=5, proxies=proxies).json()['result']['value']
|
||||
else: response = requests.get(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS, timeout=5).json()['result']['value']
|
||||
under_attack = response == 'under_attack'
|
||||
|
||||
gitref = admin_git_head()
|
||||
|
@ -498,7 +498,7 @@ def purge_cache(v):
|
|||
@app.post("/admin/under_attack")
|
||||
@admin_level_required(3)
|
||||
def under_attack(v):
|
||||
response = requests.get(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS, timeout=5, proxies=proxies).json()['result']['value']
|
||||
response = requests.get(f'https://api.cloudflare.com/client/v4/zones/{CF_ZONE}/settings/security_level', headers=CF_HEADERS, timeout=5).json()['result']['value']
|
||||
|
||||
if response == 'under_attack':
|
||||
ma = ModAction(
|
||||
|
|
Loading…
Reference in New Issue