This commit is contained in:
sgrossiP 2024-08-01 07:31:17 +00:00 committed by GitHub
commit 3b3beecef4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 15 deletions

View File

@ -3,7 +3,7 @@
set -euxo pipefail set -euxo pipefail
NGINX_VERSION="1.25.3" NGINX_VERSION="1.25.3"
VOD_MODULE_VERSION="1.31" VOD_MODULE_VERSION="1.33"
SECURE_TOKEN_MODULE_VERSION="1.5" SECURE_TOKEN_MODULE_VERSION="1.5"
SET_MISC_MODULE_VERSION="v0.33" SET_MISC_MODULE_VERSION="v0.33"
NGX_DEVEL_KIT_VERSION="v0.3.3" NGX_DEVEL_KIT_VERSION="v0.3.3"

View File

@ -30,3 +30,4 @@ ws4py == 0.5.*
unidecode == 1.3.* unidecode == 1.3.*
onnxruntime == 1.18.* onnxruntime == 1.18.*
openvino == 2024.1.* openvino == 2024.1.*
flask-cors == 1.10.*

View File

@ -36,6 +36,8 @@ from frigate.util.builtin import (
) )
from frigate.util.services import ffprobe_stream, restart_frigate, vainfo_hwaccel from frigate.util.services import ffprobe_stream, restart_frigate, vainfo_hwaccel
from frigate.version import VERSION from frigate.version import VERSION
from flask_cors import CORS, cross_origin
from flask_cors import CORS, cross_origin
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -60,13 +62,7 @@ def create_app(
stats_emitter: StatsEmitter, stats_emitter: StatsEmitter,
): ):
app = Flask(__name__) app = Flask(__name__)
CORS(app)
@app.before_request
def check_csrf():
if request.method in ["GET", "HEAD", "OPTIONS", "TRACE"]:
pass
if "origin" in request.headers and "x-csrf-token" not in request.headers:
return jsonify({"success": False, "message": "Missing CSRF header"}), 401
@app.before_request @app.before_request
def _db_connect(): def _db_connect():

View File

@ -548,6 +548,7 @@ def vod_ts(camera_name, start_ts, end_ts):
if 0 < duration < max_duration_ms: if 0 < duration < max_duration_ms:
clip["keyFrameDurations"] = [duration] clip["keyFrameDurations"] = [duration]
clip["id"] = "san"
clips.append(clip) clips.append(clip)
durations.append(duration) durations.append(duration)
else: else:

View File

@ -21,14 +21,12 @@ class TestConfig(unittest.TestCase):
"back": { "back": {
"ffmpeg": { "ffmpeg": {
"inputs": [ "inputs": [
{"path": "rtsp://10.0.0.1:554/video", "roles": ["detect"]} {
"path": "rtsp://admin:12publico34@elpinarfutbol.ddns.net:554/cam/realmonitor?channel=1&subtype=0",
"roles": ["record"],
}
] ]
}, },
"detect": {
"height": 1080,
"width": 1920,
"fps": 5,
},
} }
}, },
} }