Skip to content

Commit

Permalink
Merge pull request hunshcn#31 from hunshcn/dev
Browse files Browse the repository at this point in the history
fix: raw 403
  • Loading branch information
hunshcn authored Mar 27, 2021
2 parents e4872c9 + 416a54a commit f821e77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def generate():
@app.route('/<path:u>', methods=['GET', 'POST'])
def proxy(u):
u = u if u.startswith('http') else 'https://' + u
u = u.replace(':/g', '://g', 1) # uwsgi会将//传递为/
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 f821e77

Please sign in to comment.