Merge pull request #33 from hunshcn/dev

fix: add default encoding
pull/49/head
hunshcn 2021-03-29 11:25:16 +08:00 committed by GitHub
commit a60be56372
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -108,6 +108,7 @@ def proxy(u):
r_headers = dict(request.headers)
if 'Host' in r_headers:
r_headers.pop('Host')
r_headers['Accept-Encoding'] = request.headers.get('Accept-Encoding', 'identity')
try:
url = u + request.url.replace(request.base_url, '', 1)
if url.startswith('https:/') and not url.startswith('https://'):