修复
This commit is contained in:
@@ -149,6 +149,18 @@ async def _lifespan(_app: FastAPI):
|
||||
|
||||
|
||||
app = FastAPI(title="Gate Order Executor", version="0.2.0", lifespan=_lifespan)
|
||||
try:
|
||||
import sys
|
||||
from pathlib import Path as _Path
|
||||
|
||||
_root = _Path(__file__).resolve().parent.parent.parent
|
||||
if str(_root) not in sys.path:
|
||||
sys.path.insert(0, str(_root))
|
||||
from nav_embed import install_nav_embed
|
||||
|
||||
install_nav_embed(app)
|
||||
except Exception:
|
||||
pass
|
||||
app.add_middleware(
|
||||
SessionMiddleware,
|
||||
secret_key=settings.app.session_secret,
|
||||
|
||||
Reference in New Issue
Block a user