Skip to content

Commit

Permalink
fix: url handle #39
Browse files Browse the repository at this point in the history
  • Loading branch information
hunshcn committed May 30, 2021
1 parent 7d7e942 commit 6e9545a
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:https://', 1) # uwsgi会将//传递为/
if u.rfind(':https://', 3, 9) == -1:
u = u.replace('s:/', 's:https://', 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 6e9545a

Please sign in to comment.