From 253515d3fa6d529baa7b52abbb2d24128e22cafe Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 12 May 2024 10:28:08 +0200 Subject: [PATCH] Redirect HTTP to HTTPS --- kubenix-modules/traefik.nix | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/kubenix-modules/traefik.nix b/kubenix-modules/traefik.nix index 36f438c..8cf58ec 100644 --- a/kubenix-modules/traefik.nix +++ b/kubenix-modules/traefik.nix @@ -11,18 +11,22 @@ providers.kubernetesIngress.allowExternalNameServices = true; service.loadBalancerIP = myLib.globals.traefikIPv4; - ports.localsecure = { - port = 8444; - expose = true; - exposedPort = 444; - protocol = "TCP"; + ports = { + localsecure = { + port = 8444; + expose = true; + exposedPort = 444; + protocol = "TCP"; - tls = { - enabled = true; - options = ""; - certResolver = ""; - domains = [ ]; + tls = { + enabled = true; + options = ""; + certResolver = ""; + domains = [ ]; + }; }; + + web.redirectTo = "websecure"; }; }; };