From 96b1900b46ebeab33f0adee4321b9aec196be80b Mon Sep 17 00:00:00 2001 From: Cathy Hu Date: Thu, 10 Sep 2020 22:57:05 +0200 Subject: [PATCH] [core] Fix production issues --- kibicara/kibicara.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kibicara/kibicara.py b/kibicara/kibicara.py index 0941b91..7f96c6e 100644 --- a/kibicara/kibicara.py +++ b/kibicara/kibicara.py @@ -59,7 +59,9 @@ class Main: server_config.accesslog = '-' if config['production']: server_config.bind = ['0.0.0.0:8000', '[::]:8000'] - app.include_router(router, prefix='/api') + api = FastAPI() + api.include_router(router) + app.mount('/api', api) if not config['production'] and config['cors_allow_origin']: app.add_middleware( CORSMiddleware,