diff --git a/oml/server.py b/oml/server.py index fbae2fc..130f120 100644 --- a/oml/server.py +++ b/oml/server.py @@ -146,13 +146,12 @@ def run(): http_server.listen(settings.server['port'], settings.server['address'], max_buffer_size=max_buffer_size) # public server - ''' - public_port = settings.server.get('public_port') - public_address = settings.server['public_address'] - if public_port: - public_server = Application(public_handlers, **options) - public_server.listen(public_port, public_address) - ''' + if settings.preferences.get('enableReadOnlyService'): + public_port = settings.server.get('public_port') + public_address = settings.server['public_address'] + if public_port: + public_server = Application(public_handlers, **options) + public_server.listen(public_port, public_address) if PID: with open(PID, 'w') as pid: