Add go2rtc proxy to fix CORS-blocked WebRTC/MSE streams

This commit is contained in:
root
2026-02-25 22:11:56 -06:00
parent da5637fbdb
commit ba2824ec56
4 changed files with 78 additions and 11 deletions

View File

@@ -10,6 +10,7 @@ from config import load_config
from mqtt_bridge import start_mqtt
from routes.config_routes import router as config_router
from routes.ws_routes import router as ws_router
from routes.go2rtc_proxy import router as go2rtc_router
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(name)s: %(message)s")
logger = logging.getLogger(__name__)
@@ -29,6 +30,7 @@ app = FastAPI(title="Camera Viewer", lifespan=lifespan)
app.include_router(config_router)
app.include_router(ws_router)
app.include_router(go2rtc_router)
# Serve frontend static files
if FRONTEND_DIR.exists():