Skip to content

Commit

Permalink
nixos/frigate: stop enabling recommendedProxySettings globally
Browse files Browse the repository at this point in the history
Closes: NixOS#320512
  • Loading branch information
mweinelt committed Nov 21, 2024
1 parent 7d70211 commit 80eecdb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion nixos/modules/services/video/frigate.nix
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ in
set-misc
vod
];
recommendedProxySettings = mkDefault true;
recommendedGzipSettings = mkDefault true;
mapHashBucketSize = mkDefault 128;
upstreams = {
Expand Down Expand Up @@ -207,6 +206,7 @@ in
# auth_location.conf
"/auth" = {
proxyPass = "http://frigate-api/auth";
recommendedProxySettings = true;
extraConfig = ''
internal;
Expand Down Expand Up @@ -311,18 +311,21 @@ in
};
"/ws" = {
proxyPass = "http://frigate-mqtt-ws/";
recommendedProxySettings = true;
proxyWebsockets = true;
extraConfig = nginxAuthRequest + nginxProxySettings;
};
"/live/jsmpeg" = {
proxyPass = "http://frigate-jsmpeg/";
recommendedProxySettings = true;
proxyWebsockets = true;
extraConfig = nginxAuthRequest + nginxProxySettings;
};
# frigate lovelace card uses this path
"/live/mse/api/ws" = {
proxyPass = "http://frigate-go2rtc/api/ws";
proxyWebsockets = true;
recommendedProxySettings = true;
extraConfig = nginxAuthRequest + nginxProxySettings + ''
limit_except GET {
deny all;
Expand All @@ -332,6 +335,7 @@ in
"/live/webrtc/api/ws" = {
proxyPass = "http://frigate-go2rtc/api/ws";
proxyWebsockets = true;
recommendedProxySettings = true;
extraConfig = nginxAuthRequest + nginxProxySettings + ''
limit_except GET {
deny all;
Expand All @@ -341,6 +345,7 @@ in
# pass through go2rtc player
"/live/webrtc/webrtc.html" = {
proxyPass = "http://frigate-go2rtc/webrtc.html";
recommendedProxySettings = true;
extraConfig = nginxAuthRequest + nginxProxySettings + ''
limit_except GET {
deny all;
Expand All @@ -350,6 +355,7 @@ in
# frontend uses this to fetch the version
"/api/go2rtc/api" = {
proxyPass = "http://frigate-go2rtc/api";
recommendedProxySettings = true;
extraConfig = nginxAuthRequest + nginxProxySettings + ''
limit_except GET {
deny all;
Expand All @@ -360,6 +366,7 @@ in
"/api/go2rtc/webrtc" = {
proxyPass = "http://frigate-go2rtc/api/webrtc";
proxyWebsockets = true;
recommendedProxySettings = true;
extraConfig = nginxAuthRequest + nginxProxySettings + ''
limit_except GET {
deny all;
Expand All @@ -368,12 +375,14 @@ in
};
"~* /api/.*\.(jpg|jpeg|png|webp|gif)$" = {
proxyPass = "http://frigate-api";
recommendedProxySettings = true;
extraConfig = nginxAuthRequest + nginxProxySettings + ''
rewrite ^/api/(.*)$ $1 break;
'';
};
"/api/" = {
proxyPass = "http://frigate-api/";
recommendedProxySettings = true;
extraConfig = nginxAuthRequest + nginxProxySettings + ''
add_header Cache-Control "no-store";
expires off;
Expand Down

0 comments on commit 80eecdb

Please sign in to comment.