Skip to content

Commit

Permalink
fix: url handle hunshcn#39
Browse files Browse the repository at this point in the history
  • Loading branch information
hunshcn committed May 30, 2021
1 parent 7d48173 commit 46a2c6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def generate():
@app.route('/<path:u>', methods=['GET', 'POST'])
def proxy(u):
u = u if u.startswith('http') else 'https://' + u
u = u.replace('s:/', 's://', 1) # uwsgi会将//传递为/
if u.rfind('://', 3, 9) == -1:
u = u.replace('s:/', 's://', 1) # uwsgi会将//传递为/
if not any([i.match(u) for i in [exp1, exp2, exp3, exp4, exp5]]):
return Response('Invalid input.', status=403)
if jsdelivr and exp2.match(u):
Expand Down

0 comments on commit 46a2c6a

Please sign in to comment.