diff --git a/app.py b/app.py index 5a3e7c2..a59d69d 100644 --- a/app.py +++ b/app.py @@ -16,13 +16,13 @@ def home(): @app.route("/") def proxy(url): - jsdelivr_url = f"https://cdnjs.cloudflare.com/{url}" + cdnjs_url = f"https://cdnjs.cloudflare.com/{url}" def generate(): # Subfunction to allow streaming the data instead of # downloading all of it at once try: - with urlopen(unquote(url)) as data: + with urlopen(unquote(cdnjs_url)) as data: while True: chunk = data.read(1024 * 1024) if not chunk: @@ -32,7 +32,7 @@ def proxy(url): abort(e.code) try: - with urlopen(unquote(jsdelivr_url)) as data: + with urlopen(unquote(cdnjs_url)) as data: content_type = data.headers["content-type"] except HTTPError as e: abort(e.code)