From ad9b660f7501266e345245a158490254591b6d84 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Wed, 28 Dec 2022 19:43:10 -0500 Subject: Fix nginx setup for bridge --- modules/bridge.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/bridge.nix b/modules/bridge.nix index 270822b..eb2a0c0 100644 --- a/modules/bridge.nix +++ b/modules/bridge.nix @@ -46,6 +46,12 @@ in with lib; { forceSSL = true; root = "/opt/bridge-nightly/profile"; locations."/api".proxyPass = "http://localhost:${toString cfg.port}"; + extraConfig = '' + # Single-page application setup. + # First attempt to serve request as file, then + # as directory, then fall back to redirecting to index.html + try_files $uri $uri/ $uri.html /index.html; + ''; }; services.postgresql = { -- cgit v1.2.3