frigate: gate frontend with Authelia, not just API routes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-22 23:09:00 +01:00
parent ad11fb3033
commit b957d88ff6

View file

@ -94,6 +94,13 @@
''; '';
}; };
# The Frigate module serves the frontend from "/" without auth_request,
# so unauthenticated users see a broken loading page instead of being
# redirected to Authelia. Gate it behind auth too.
locations."/".extraConfig = lib.mkAfter ''
auth_request /auth;
'';
# Redirect 401 → Authelia login portal # Redirect 401 → Authelia login portal
extraConfig = lib.mkAfter '' extraConfig = lib.mkAfter ''
error_page 401 =302 https://auth.nordhammer.it/?rd=$scheme://$http_host$request_uri; error_page 401 =302 https://auth.nordhammer.it/?rd=$scheme://$http_host$request_uri;