diff --git a/openlp/plugins/remotes/lib/httprouter.py b/openlp/plugins/remotes/lib/httprouter.py index 644bb4841..5f62b196a 100644 --- a/openlp/plugins/remotes/lib/httprouter.py +++ b/openlp/plugins/remotes/lib/httprouter.py @@ -150,7 +150,7 @@ class HttpRouter(RegistryProperties): self.routes = [ ('^/$', {'function': self.serve_file, 'secure': False}), ('^/(stage)$', {'function': self.serve_file, 'secure': False}), - ('^/(stage)/(.*)$', {'function': self.stages, 'secure': False}), + ('^/(stages)/(.*)$', {'function': self.stages, 'secure': False}), ('^/(main)$', {'function': self.serve_file, 'secure': False}), (r'^/files/(.*)$', {'function': self.serve_file, 'secure': False}), (r'^/(\w+)/thumbnails([^/]+)?/(.*)$', {'function': self.serve_thumbnail, 'secure': False}), @@ -352,10 +352,12 @@ class HttpRouter(RegistryProperties): """ log.debug('serve file request %s' % file_name) parts = file_name.split('/') - if len(parts) == 3: - file_name = parts[0] + '/' + parts[2] + if len(parts) == 1: + file_name = parts[0] + '/stage.html' + elif len(parts) == 3: + print(parts) + file_name = parts[1] + '/' + parts[2] path = os.path.normpath(os.path.join(self.config_dir, file_name)) - print(path) if not path.startswith(self.config_dir): return self.do_not_found() content = None diff --git a/openlp/plugins/remotes/lib/httpserver.py b/openlp/plugins/remotes/lib/httpserver.py index fa1348314..958088b00 100644 --- a/openlp/plugins/remotes/lib/httpserver.py +++ b/openlp/plugins/remotes/lib/httpserver.py @@ -167,7 +167,7 @@ class HTTPSServer(HTTPServer): local_data = AppLocation.get_directory(AppLocation.DataDir) self.socket = ssl.SSLSocket( sock=socket.socket(self.address_family, self.socket_type), - ssl_version=ssl.PROTOCOL_TLSv1, + ssl_version=ssl.PROTOCOL_TLSv1_2, certfile=os.path.join(local_data, 'remotes', 'openlp.crt'), keyfile=os.path.join(local_data, 'remotes', 'openlp.key'), server_side=True)