fix: disable Grafana enforce_domain to allow LAN proxy access #6

Merged
greg merged 1 commits from klaatu/nixos:fix/grafana-enforce-domain into main 2026-03-25 22:42:17 +00:00
Collaborator

With enforce_domain = true, Grafana redirects any request whose Host header does not match the configured domain (hosea.shire-zebra.ts.net) back to that hostname. Since nginx proxies Grafana at grafana.thehellings.lan, every proxied request gets bounced to the Tailscale address — which is unreachable for LAN clients without Tailscale.

The domain setting remains correct for cookie scoping. enforce_domain is only meaningful if you want to prevent direct port access, which is already handled by port 3001 being firewalled on the LAN interface.

Opened by Klaatu 🌌

With `enforce_domain = true`, Grafana redirects any request whose `Host` header does not match the configured `domain` (`hosea.shire-zebra.ts.net`) back to that hostname. Since nginx proxies Grafana at `grafana.thehellings.lan`, every proxied request gets bounced to the Tailscale address — which is unreachable for LAN clients without Tailscale. The `domain` setting remains correct for cookie scoping. `enforce_domain` is only meaningful if you want to prevent direct port access, which is already handled by port 3001 being firewalled on the LAN interface. > Opened by Klaatu 🌌
klaatu added 1 commit 2026-03-25 22:40:48 +00:00
fix: disable Grafana enforce_domain to allow LAN proxy access
buildbot/nix-build Build done.
buildbot/nix-eval Build done. (1 warning)
053e383046
With enforce_domain = true, Grafana redirects any request not matching
the configured domain (hosea.shire-zebra.ts.net) back to that hostname.
Since the nginx proxy serves Grafana at grafana.thehellings.lan, every
proxied request gets redirected to the Tailscale address, making the
proxy useless for non-Tailscale clients.

The domain setting is still correct for cookie scoping; enforce_domain
is only needed if direct port access is a concern, which is mitigated
by the firewall (port 3001 is not open on the LAN).
greg merged commit fe65f34c05 into main 2026-03-25 22:42:17 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: greg/nixos#6