remove proxies from cloudflare

master
Aevann1 2022-09-26 04:39:03 +02:00
parent 338726f225
commit 7e4e98887b
1 changed files with 2 additions and 2 deletions

View File

@ -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(