修改引入路径移除src
This commit is contained in:
16
src/app.py
16
src/app.py
@@ -17,18 +17,18 @@ from fastapi.openapi.docs import (
|
||||
)
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
from src.api.routes import face_features
|
||||
from src.api.routes.algorithm_router import router as algorithm_router, sync_videofacebiz_params, sync_videofacebiz_blacklist
|
||||
from src.api.errors import (
|
||||
from api.routes import face_features
|
||||
from api.routes.algorithm_router import router as algorithm_router, sync_videofacebiz_params, sync_videofacebiz_blacklist
|
||||
from api.errors import (
|
||||
APIError,
|
||||
validation_exception_handler,
|
||||
api_error_handler,
|
||||
generic_exception_handler
|
||||
)
|
||||
from src.config import settings
|
||||
from src.database.connection import init_database
|
||||
from src.database.connection import db_manager
|
||||
from src.rtsp.service import rtsp_server
|
||||
from config import settings
|
||||
from database.connection import init_database
|
||||
from database.connection import db_manager
|
||||
from rtsp.service import rtsp_server
|
||||
|
||||
|
||||
# 生命周期管理
|
||||
@@ -134,7 +134,7 @@ app.add_middleware(
|
||||
|
||||
app.add_middleware(
|
||||
TrustedHostMiddleware,
|
||||
allowed_hosts=["*"] if settings.DEBUG else ["localhost", "127.0.0.1"]
|
||||
allowed_hosts=["*"] if settings.DEBUG else ["localhost", "127.0.0.1", "0.0.0.0"]
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user