Skip to content

NVR with realtime local object detection for IP cameras

Peroparly handle text based responses (#13964)

Nicolas Mowenfef30bc671a4
diff --git a/frigate/api/app.py b/frigate/api/app.py
index 6b6a232fe9..d4e3b41b61 100644
--- a/frigate/api/app.py
+++ b/frigate/api/app.py
@@ -13,7 +13,7 @@ import requests
from fastapi import APIRouter, Path, Request, Response
from fastapi.encoders import jsonable_encoder
from fastapi.params import Depends
-from fastapi.responses import JSONResponse
+from fastapi.responses import JSONResponse, PlainTextResponse
from markupsafe import escape
from peewee import operator
@@ -37,7 +37,7 @@ logger = logging.getLogger(__name__)
router = APIRouter(tags=[Tags.app])
[email protected]("/", response_class=PlainTextResponse)
def is_healthy():
return "Frigate is running. Alive and healthy!"
@@ -82,9 +82,9 @@ def go2rtc_camera_stream(camera_name: str):
return JSONResponse(content=stream_data)
[email protected]("/version")
[email protected]("/version", response_class=PlainTextResponse)
def version():
- return JSONResponse(content=VERSION, media_type="text/html", status_code=200)
+ return VERSION
@router.get("/stats")