print upstream proxy
This commit is contained in:
parent
34734bb7e4
commit
69e9a75d15
@ -267,14 +267,16 @@ class MainHandler(tornado.web.RequestHandler):
|
||||
self.write("Stream not found. (invalid upstream)")
|
||||
else:
|
||||
upstream_proxy = await handler.proxy.proxy_url(upstream, None)
|
||||
logger.info(upstream_proxy)
|
||||
ctype = await handler.proxy.content_type(upstream_proxy)
|
||||
self.set_header("Content-Type", ctype)
|
||||
if redir:
|
||||
if ctype == "application/vnd.apple.mpegurl":
|
||||
async with handler.proxy.local() as session:
|
||||
resp = await session.get(upstream_proxy)
|
||||
data = await resp.read()
|
||||
self.write(data)
|
||||
elif redir:
|
||||
else:
|
||||
self.redirect(upstream_proxy, status=303)
|
||||
|
||||
async def get(self):
|
||||
|
Loading…
Reference in New Issue
Block a user