Avoid proxy loop

This commit is contained in:
oldnapalm
2023-10-15 19:24:27 -03:00
parent 422f55eb70
commit b4e5c43b5f
+1 -4
View File
@@ -151,10 +151,7 @@ class CDNHandler(SimpleHTTPRequestHandler):
self.wfile.write(output.encode())
CLIMB_OVERRIDE.remove(override)
return
exceptions = ['Launcher_ver_cur.xml', 'LauncherMac_ver_cur.xml',
'Zwift_ver_cur.xml', 'ZwiftMac_ver_cur.xml',
'ZwiftAndroid_ver_cur.xml', 'Zwift_StreamingFiles_ver_cur.xml']
if CDN_PROXY and self.path.startswith('/gameassets/') and not path_end in exceptions:
if CDN_PROXY and self.path.startswith('/gameassets/') and not path_end.endswith('_ver_cur.xml') and not ('User-Agent' in self.headers and 'python-urllib3' in self.headers['User-Agent']):
try:
self.send_response(200)
self.end_headers()