summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 = {