修复
This commit is contained in:
@@ -179,6 +179,18 @@ def create_app(settings: Settings) -> FastAPI:
|
||||
raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="unauthorized")
|
||||
|
||||
app = FastAPI(title="MATRIX FUNNEL", version="2.1.0")
|
||||
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(GZipMiddleware, minimum_size=800)
|
||||
app.add_middleware(
|
||||
SessionMiddleware,
|
||||
|
||||
Reference in New Issue
Block a user