use head for redirect

This commit is contained in:
Roy Olav Purser 2021-05-09 13:16:55 +02:00
parent afbbc032ee
commit a57727a1c7
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -96,7 +96,7 @@ class MainHandler(tornado.web.RequestHandler):
proxy = proxies.get(provider) proxy = proxies.get(provider)
src = providers[provider] + self.request.uri src = providers[provider] + self.request.uri
try: try:
resp = requests.get(src) resp = requests.head(src)
if resp is not None: if resp is not None:
src = resp.url src = resp.url
except Exception as e: except Exception as e: