disable redirect for head

This commit is contained in:
Roy Olav Purser 2021-05-29 15:55:13 +02:00
parent 7503bd2357
commit f76f084c01
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -269,7 +269,9 @@ class MainHandler(tornado.web.RequestHandler):
upstream_proxy = await handler.proxy.proxy_url(upstream, None)
ctype = await handler.proxy.content_type(upstream_proxy)
self.set_header("Content-Type", ctype)
self.redirect(upstream_proxy, status=303)
self.set_header("Content-Location", upstream_proxy)
if redir:
self.redirect(upstream_proxy, status=303)
async def get(self):
await self.handle_any(True)
async def head(self):