[core] Fix production issues
This commit is contained in:
parent
28396eb379
commit
96b1900b46
|
@ -59,7 +59,9 @@ class Main:
|
||||||
server_config.accesslog = '-'
|
server_config.accesslog = '-'
|
||||||
if config['production']:
|
if config['production']:
|
||||||
server_config.bind = ['0.0.0.0:8000', '[::]:8000']
|
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']:
|
if not config['production'] and config['cors_allow_origin']:
|
||||||
app.add_middleware(
|
app.add_middleware(
|
||||||
CORSMiddleware,
|
CORSMiddleware,
|
||||||
|
|
Loading…
Reference in a new issue