From 7103636ed6f397c9a04580ba13a4bc5275cc3235 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Thu, 11 Jul 2024 14:28:27 +0200 Subject: [PATCH] infra: put api on same endpoint --- nix/infra/nginx.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nix/infra/nginx.nix b/nix/infra/nginx.nix index fbe1985..7dd0080 100644 --- a/nix/infra/nginx.nix +++ b/nix/infra/nginx.nix @@ -15,7 +15,10 @@ "clan-war.net" = { enableACME = true; forceSSL = true; - locations."/".root = "${self.legacyPackages.${config.nixpkgs.hostPlatform.system}.web.override { withBackendUrl = "https://api.clan-war.net/api/v1";}}/"; + locations = { + "/".root = "${self.legacyPackages.${config.nixpkgs.hostPlatform.system}.web.override { withBackendUrl = "https://clan-war.net/api/v1";}}/"; + "/api".proxyPass = "http://localhost:8080/api"; + }; }; "api.clan-war.net" = { forceSSL = true;