diff --git a/conf/__init__.py b/conf/__init__.py index 5703e85..855b69c 100644 --- a/conf/__init__.py +++ b/conf/__init__.py @@ -5,8 +5,10 @@ from fastapi import FastAPI UVICORN_ROOT_PATH = os.environ.get('UVICORN_ROOT_PATH') -#app = FastAPI(root_path=UVICORN_ROOT_PATH) -app = FastAPI() +if UVICORN_ROOT_PATH and len(UVICORN_ROOT_PATH) > 0 and UVICORN_ROOT_PATH != '/': + app = FastAPI(root_path=UVICORN_ROOT_PATH) +else: + app = FastAPI() @app.get("/") def read_root():