request media directely

This commit is contained in:
2021-05-29 16:02:12 +02:00
parent f76f084c01
commit 4f2501ed98
2 changed files with 5 additions and 2 deletions

View File

@ -269,9 +269,11 @@ 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.set_header("Content-Location", upstream_proxy)
if redir:
self.redirect(upstream_proxy, status=303)
else:
self.set_header("Content-Location", upstream_proxy)
async def get(self):
await self.handle_any(True)
async def head(self):