summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Orbekk <kj@orbekk.com>2022-12-28 19:43:10 -0500
committerKjetil Orbekk <kj@orbekk.com>2022-12-28 19:46:51 -0500
commitad9b660f7501266e345245a158490254591b6d84 (patch)
tree154c8096640879c97d0d1d77543c93b7a9b69833
parenteed939216dd42377ed0e981149ba5f588e11e9a1 (diff)
Fix nginx setup for bridge
-rw-r--r--modules/bridge.nix6
1 files changed, 6 insertions, 0 deletions
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 = {