This commit is contained in:
dekun
2026-05-30 15:40:43 +08:00
parent 0a42bd4de9
commit 1f8d2e64e7
4 changed files with 92 additions and 0 deletions
+12
View File
@@ -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,