mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Add dir to nginx
This commit is contained in:
parent
3649dd3d59
commit
9c32404e91
@ -172,6 +172,27 @@ http {
|
|||||||
root /media/frigate;
|
root /media/frigate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /exports/ {
|
||||||
|
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||||
|
add_header 'Access-Control-Allow-Credentials' 'true';
|
||||||
|
add_header 'Access-Control-Expose-Headers' 'Content-Length';
|
||||||
|
if ($request_method = 'OPTIONS') {
|
||||||
|
add_header 'Access-Control-Allow-Origin' "$http_origin";
|
||||||
|
add_header 'Access-Control-Max-Age' 1728000;
|
||||||
|
add_header 'Content-Type' 'text/plain charset=UTF-8';
|
||||||
|
add_header 'Content-Length' 0;
|
||||||
|
return 204;
|
||||||
|
}
|
||||||
|
|
||||||
|
types {
|
||||||
|
video/mp4 mp4;
|
||||||
|
}
|
||||||
|
|
||||||
|
autoindex on;
|
||||||
|
autoindex_format json;
|
||||||
|
root /media/frigate;
|
||||||
|
}
|
||||||
|
|
||||||
location /ws {
|
location /ws {
|
||||||
proxy_pass http://mqtt_ws/;
|
proxy_pass http://mqtt_ws/;
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
|
|||||||
@ -88,8 +88,6 @@ class RecordingExporter(threading.Thread):
|
|||||||
p = sp.run(
|
p = sp.run(
|
||||||
ffmpeg_cmd,
|
ffmpeg_cmd,
|
||||||
input="\n".join(playlist_lines)
|
input="\n".join(playlist_lines)
|
||||||
if len(playlist_lines) > 1
|
|
||||||
else playlist_lines,
|
|
||||||
encoding="ascii",
|
encoding="ascii",
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user