From 619ef92f777aa05ced25ea810f6164a1d563e47a Mon Sep 17 00:00:00 2001 From: Stille Date: Mon, 19 Feb 2024 10:24:53 +0800 Subject: [PATCH] fix gh-proxy --- gh-proxy/app/main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gh-proxy/app/main.py b/gh-proxy/app/main.py index e8a419d..8747290 100644 --- a/gh-proxy/app/main.py +++ b/gh-proxy/app/main.py @@ -10,6 +10,7 @@ from requests.utils import ( stream_decode_response_unicode, iter_slices, CaseInsensitiveDict) from urllib3.exceptions import ( DecodeError, ReadTimeoutError, ProtocolError) +from urllib.parse import quote # config # 分支文件使用jsDelivr镜像的开关,0为关闭,默认关闭 @@ -154,6 +155,7 @@ def handler(u): if url.startswith('https:/') and not url.startswith('https://'): url = 'https://' + url[7:] return redirect(url) + u = quote(u, safe='/:') return proxy(u)