From b4e5c43b5fb8de5fb086dbda3ae517d5550d093a Mon Sep 17 00:00:00 2001 From: oldnapalm <38410858+oldnapalm@users.noreply.github.com> Date: Sun, 15 Oct 2023 19:24:27 -0300 Subject: [PATCH] Avoid proxy loop --- standalone.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/standalone.py b/standalone.py index 6cbf82e..37343b2 100644 --- a/standalone.py +++ b/standalone.py @@ -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()