diff --git a/stream.py b/stream.py index 8e9e8db..1afe4bb 100755 --- a/stream.py +++ b/stream.py @@ -175,9 +175,9 @@ class MainHandler(tornado.web.RequestHandler): def handle_render(self, provider): if template_js is not None and template_html is not None: origin = self.request.path - if stream_path is not None: + if stream_server is not None: origin = f'{stream_server}{self.request.path}' - stream_path = f'{stream_server}{self.request.path}?provider={provider}' + stream_path = f'{origin}?provider={provider}' rendered_js = template_js.generate(stream=stream_path); b64_js = str(base64.b64encode(rendered_js), "ascii") script = f'data:text/javascript;charset=utf-8;base64,{b64_js}' @@ -188,7 +188,7 @@ class MainHandler(tornado.web.RequestHandler): self.write("HTML template missing.") def handle_embed(self, provider): origin = self.request.path - if stream_path is not None: + if stream_server is not None: origin = f'{stream_server}{self.request.path}' embed_json = {} embed_json["version"] = "1.0"