Browse Source

Merge pull request #31 from hunshcn/dev

fix: raw 403
pull/49/head
hunshcn 4 years ago committed by GitHub
parent
commit
f821e7798c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/main.py

2
app/main.py

@ -88,7 +88,7 @@ def iter_content(self, chunk_size=1, decode_unicode=False):
@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):

Loading…
Cancel
Save