From 9dc3eeb57ff930d4deceb06f73b96170cd2b805d Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Thu, 13 Feb 2025 04:29:03 +0100 Subject: [PATCH] WIP: Testing better error pages --- infrastructure/configs/middleware.yaml | 18 ++++++++++++++++++ infrastructure/controllers/traefik.yaml | 1 + 2 files changed, 19 insertions(+) diff --git a/infrastructure/configs/middleware.yaml b/infrastructure/configs/middleware.yaml index 846e631..986309d 100644 --- a/infrastructure/configs/middleware.yaml +++ b/infrastructure/configs/middleware.yaml @@ -14,3 +14,21 @@ spec: customFrameOptionsValue: SAMEORIGIN customRequestHeaders: X-Forwarded-Proto: https +--- +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: test-errors + namespace: default +spec: + errors: + status: + - "403" + - "500" + - "501" + - "503" + - "505-599" + query: /{status}.html + service: + name: whoami + port: 80 diff --git a/infrastructure/controllers/traefik.yaml b/infrastructure/controllers/traefik.yaml index 3267e94..3a7cdf5 100644 --- a/infrastructure/controllers/traefik.yaml +++ b/infrastructure/controllers/traefik.yaml @@ -47,6 +47,7 @@ spec: websecure: middlewares: - default-default-headers@kubernetescrd + - default-test-errors@kubernetescrd providers: kubernetesCRD: