mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
refactor and disable access logs for stats and version (#8259)
This commit is contained in:
parent
c8b38bdd47
commit
18545718c1
@ -149,62 +149,57 @@ http {
|
|||||||
|
|
||||||
location /ws {
|
location /ws {
|
||||||
proxy_pass http://mqtt_ws/;
|
proxy_pass http://mqtt_ws/;
|
||||||
proxy_http_version 1.1;
|
include proxy.conf;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "Upgrade";
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /live/jsmpeg/ {
|
location /live/jsmpeg/ {
|
||||||
proxy_pass http://jsmpeg/;
|
proxy_pass http://jsmpeg/;
|
||||||
proxy_http_version 1.1;
|
include proxy.conf;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "Upgrade";
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /live/mse/ {
|
location /live/mse/ {
|
||||||
proxy_pass http://go2rtc/;
|
proxy_pass http://go2rtc/;
|
||||||
proxy_http_version 1.1;
|
include proxy.conf;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "Upgrade";
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /live/webrtc/ {
|
location /live/webrtc/ {
|
||||||
proxy_pass http://go2rtc/;
|
proxy_pass http://go2rtc/;
|
||||||
proxy_http_version 1.1;
|
include proxy.conf;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "Upgrade";
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* /api/go2rtc([/]?.*)$ {
|
location ~* /api/go2rtc([/]?.*)$ {
|
||||||
proxy_pass http://go2rtc;
|
proxy_pass http://go2rtc;
|
||||||
rewrite ^/api/go2rtc(.*)$ /api$1 break;
|
rewrite ^/api/go2rtc(.*)$ /api$1 break;
|
||||||
proxy_http_version 1.1;
|
include proxy.conf;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "Upgrade";
|
|
||||||
proxy_set_header Host $host;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* /api/.*\.(jpg|jpeg|png)$ {
|
location ~* /api/.*\.(jpg|jpeg|png)$ {
|
||||||
rewrite ^/api/(.*)$ $1 break;
|
rewrite ^/api/(.*)$ $1 break;
|
||||||
proxy_pass http://frigate_api;
|
proxy_pass http://frigate_api;
|
||||||
proxy_pass_request_headers on;
|
include proxy.conf;
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
add_header Cache-Control "no-store";
|
add_header Cache-Control "no-store";
|
||||||
expires off;
|
expires off;
|
||||||
proxy_pass http://frigate_api/;
|
proxy_pass http://frigate_api/;
|
||||||
proxy_pass_request_headers on;
|
include proxy.conf;
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
location /api/stats {
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
access_log off;
|
||||||
|
add_header Cache-Control "no-store";
|
||||||
|
expires off;
|
||||||
|
proxy_pass http://frigate_api/;
|
||||||
|
include proxy.conf;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/version {
|
||||||
|
access_log off;
|
||||||
|
add_header Cache-Control "no-store";
|
||||||
|
expires off;
|
||||||
|
proxy_pass http://frigate_api/;
|
||||||
|
include proxy.conf;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
4
docker/main/rootfs/usr/local/nginx/conf/proxy.conf
Normal file
4
docker/main/rootfs/usr/local/nginx/conf/proxy.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header Host $host;
|
Loading…
Reference in New Issue
Block a user