Skip to content

Commit 9bf5f34

Browse files
committed
fix: Proxy url encoded
1 parent e1b7639 commit 9bf5f34

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/main.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
stream_decode_response_unicode, iter_slices, CaseInsensitiveDict)
1111
from urllib3.exceptions import (
1212
DecodeError, ReadTimeoutError, ProtocolError)
13+
from urllib.parse import quote
1314

1415
# config
1516
# 分支文件使用jsDelivr镜像的开关,0为关闭,默认关闭
@@ -154,6 +155,7 @@ def handler(u):
154155
if url.startswith('https:/') and not url.startswith('https://'):
155156
url = 'https://' + url[7:]
156157
return redirect(url)
158+
u = quote(u, safe='/:')
157159
return proxy(u)
158160

159161

0 commit comments

Comments
 (0)