From 786a7e183de7611104cfa1995e0dddcddaa2f207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20Goinvic?= Date: Thu, 20 Feb 2025 11:31:21 +0100 Subject: [PATCH] haproxy: 429 as json --- charts/matrix-stack/templates/haproxy/configmap.yaml | 6 ++---- newsfragments/220.changed.1.md | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 newsfragments/220.changed.1.md diff --git a/charts/matrix-stack/templates/haproxy/configmap.yaml b/charts/matrix-stack/templates/haproxy/configmap.yaml index 83e5e475..8fa985e0 100644 --- a/charts/matrix-stack/templates/haproxy/configmap.yaml +++ b/charts/matrix-stack/templates/haproxy/configmap.yaml @@ -20,13 +20,11 @@ data: HTTP/1.0 429 Too Many Requests Cache-Control: no-cache Connection: close - Content-Type: text/html + Content-Type: application/json access-control-allow-origin: * access-control-allow-methods: GET, POST, PUT, DELETE, OPTIONS access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept, Authorization -

429 Too Many Requests

- No server is available to handle this request. - + {"errcode":"M_UNKNOWN","error":"Server is unavailable"} {{- end -}} {{- end -}} diff --git a/newsfragments/220.changed.1.md b/newsfragments/220.changed.1.md new file mode 100644 index 00000000..619805c0 --- /dev/null +++ b/newsfragments/220.changed.1.md @@ -0,0 +1 @@ +HAProxy: Return 429 error code as Matrix Json format.