Skip to content

netbird-dashboard: fix SPA routing by falling back to index.html#500798

Merged
K900 merged 1 commit intoNixOS:masterfrom
ujaandas:patch-1
Mar 23, 2026
Merged

netbird-dashboard: fix SPA routing by falling back to index.html#500798
K900 merged 1 commit intoNixOS:masterfrom
ujaandas:patch-1

Conversation

@ujaandas
Copy link
Copy Markdown
Contributor

@ujaandas ujaandas commented Mar 17, 2026

Motivation for this change

The NetBird dashboard is a Single Page Application (SPA). Currently, the nixos/netbird-dashboard module configures Nginx without a fallback to index.html.

Because of this, when users attempt to authenticate using an IDP (like Keycloak or PocketID), the IDP redirects back to the dashboard at routes like /auth or /silent-auth. Nginx intercepts these, fails to find a matching file, and returns a 404 instead of letting the SPA handle the routing.

This change updates the default Nginx tryFiles configuration to "$uri $uri/ /index.html", which properly routes these requests to the frontend app.

I'll run more tests when I can.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

github-actions[bot]

This comment was marked as outdated.

@ujaandas ujaandas changed the base branch from nixos-unstable to master March 17, 2026 19:01
@nixpkgs-ci nixpkgs-ci Bot closed this Mar 17, 2026
@nixpkgs-ci nixpkgs-ci Bot reopened this Mar 17, 2026
@github-actions github-actions Bot dismissed their stale review March 17, 2026 19:02

Review dismissed automatically

@ujaandas ujaandas changed the title Fix SPA routing by falling back to index.html netbird-dashboard: fix SPA routing by falling back to index.html Mar 17, 2026
@nixpkgs-ci nixpkgs-ci Bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 12.first-time contribution This PR is the author's first one; please be gentle! 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Mar 17, 2026
@ujaandas ujaandas marked this pull request as draft March 17, 2026 19:19
@ujaandas ujaandas marked this pull request as ready for review March 17, 2026 19:25
@K900 K900 added this pull request to the merge queue Mar 23, 2026
Merged via the queue into NixOS:master with commit 51282b7 Mar 23, 2026
40 of 43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants