Added SSL Options (#416)

This commit is contained in:
OzzieIsaacs
2018-03-30 21:20:47 +02:00
parent a8b3da24bf
commit af5a897d1d
18 changed files with 1700 additions and 1358 deletions
+9 -1
View File
@@ -30,11 +30,19 @@ if __name__ == '__main__':
else:
web.app.logger.info('Falling back to Tornado')
# Max Buffersize set to 200MB
http_server = HTTPServer(WSGIContainer(web.app),max_buffer_size = 209700000)
if web.ub.config.get_config_certfile() and web.ub.config.get_config_keyfile():
ssl={"certfile": web.ub.config.get_config_certfile(),
"keyfile": web.ub.config.get_config_keyfile()}
else:
ssl=None
http_server = HTTPServer(WSGIContainer(web.app),
max_buffer_size = 209700000,
ssl_options=ssl)
http_server.listen(web.ub.config.config_port)
IOLoop.instance().start()
IOLoop.instance().close(True)
if web.helper.global_task == 0:
web.app.logger.info("Performing restart of Calibre-web")
os.execl(sys.executable, sys.executable, *sys.argv)