diff --git a/kibicara/config.py b/kibicara/config.py index e3f674f..ae81933 100644 --- a/kibicara/config.py +++ b/kibicara/config.py @@ -24,13 +24,15 @@ from sys import argv config = { 'database_connection': 'sqlite:////tmp/kibicara.sqlite', - 'frontend_url': 'http://127.0.0.1:4200', # dev default - 'behind_proxy': False, + 'frontend_url': 'http://127.0.0.1:4200', # url of frontend, change in prod # production params - 'frontend_path': None, + 'frontend_path': None, # required, path to frontend html/css/js files 'production': True, + 'behind_proxy': False, + 'keyfile': None, # optional for ssl + 'certfile': None, # optional for ssl # dev params - 'root_url': 'http://localhost:8000', + 'root_url': 'http://localhost:8000', # url of backend 'cors_allow_origin': 'http://127.0.0.1:4200', } """ Default configuration. diff --git a/kibicara/kibicara.py b/kibicara/kibicara.py index b06201c..b4d9b38 100644 --- a/kibicara/kibicara.py +++ b/kibicara/kibicara.py @@ -58,6 +58,8 @@ class Main: server_config = Config() server_config.accesslog = '-' server_config.behind_proxy = config['behind_proxy'] + server_config.keyfile = config['keyfile'] + server_config.certfile = config['certfile'] if config['production']: server_config.bind = ['0.0.0.0:8000', '[::]:8000'] api = FastAPI()