From 72317aba2b87282d0ff3652345af8d2bd28e70f6 Mon Sep 17 00:00:00 2001
From: Florian Sesser <florian@private.storage>
Date: Thu, 30 Sep 2021 16:06:18 +0000
Subject: [PATCH] Make payment server answer with a 404 by default

[Copy pasta](https://whetstone.privatestorage.io/privatestorage/PrivateStorageio/-/blob/ca44204076983ce02fd3e0dacd940514e0821e23/nixos/modules/spending.nix#L130) - Thanks @tomprince!
---
 nixos/modules/issuer.nix | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/nixos/modules/issuer.nix b/nixos/modules/issuer.nix
index 85c39c72..5cec1c4a 100644
--- a/nixos/modules/issuer.nix
+++ b/nixos/modules/issuer.nix
@@ -224,6 +224,12 @@ in {
           '';
           proxyPass = "http://127.0.0.1:${internalHttpPort}";
         };
+        locations."/" = {
+          # Return a 404 error for any paths not specified above.
+          extraConfig = ''
+            return 404;
+          '';
+        };
       };
     };
 
-- 
GitLab