all repos — nixfiles @ ad87ba9dfed5a69276f1fb303b1addd10979f44c

System and user configuration, managed by nix and home-manager

linde: handle errors with custom response
Alan Pearce alan@alanpearce.eu
Mon, 30 Dec 2024 18:28:18 +0100
commit

ad87ba9dfed5a69276f1fb303b1addd10979f44c

parent

3756f140002a455b09f694c833c8ce99e55a0241

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M system/linde.nixsystem/linde.nix
@@ -795,6 +795,9 @@ extraConfig = ''               encode zstd gzip
               ${security-headers {}}
               reverse_proxy ${srv.address}:${toString srv.port}
+              handle_errors {
+                respond "{err.status_code} {err.status_text}"
+              }
             '';
           };
       };