From b5a9acda3d1b0f32b7c58b0b10076e5a114b62c0 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Sat, 16 Nov 2024 22:11:03 +0100 Subject: [PATCH] heimdall: Update caddy configuration to respond with a body --- machines/heimdall/caddy/default.nix | 5 ++++- modules/keycloak/default.nix | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/machines/heimdall/caddy/default.nix b/machines/heimdall/caddy/default.nix index b00af09..70b4d8c 100644 --- a/machines/heimdall/caddy/default.nix +++ b/machines/heimdall/caddy/default.nix @@ -41,7 +41,10 @@ "boskma.frl" = { extraConfig = '' - error "Nothing to see here." 404 + respond 404 { + body "Nothing to see here." + close + } ''; }; }; diff --git a/modules/keycloak/default.nix b/modules/keycloak/default.nix index 03502ca..2f2bf20 100644 --- a/modules/keycloak/default.nix +++ b/modules/keycloak/default.nix @@ -40,9 +40,12 @@ in } route { - reverse_proxy @public_or_allowed_remote ${config.services.keycloak.settings.http-host}:${toString config.services.keycloak.settings.http-port} + reverse_proxy @public_or_allowed_remote ${config.services.keycloak.settings.http-host}:${toString config.services.keycloak.settings.http-port} - error "Nope." 403 + respond 403 { + body "Nope." + close + } } ''; };