From b85885ce835b2d61829a49841894f715b17584a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=A1=D0=B0?= =?UTF-8?q?=D0=B1=D0=B8=D0=BB=D0=B8=D0=BD?= Date: Tue, 5 May 2026 14:02:19 +0300 Subject: [PATCH] =?UTF-8?q?[Bug]=20fallback=20=D1=81=D0=B5=D1=80=D0=B2?= =?UTF-8?q?=D0=B8=D1=81=20=D0=B4=D0=BE=D0=BB=D0=B6=D0=B5=D0=BD=20=D0=BE?= =?UTF-8?q?=D1=82=D0=B4=D0=B0=D0=B2=D0=B0=D1=82=D1=8C=D1=81=D1=8F=20=D1=82?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20=D0=BD=D0=B0=20=D1=84=D1=80?= =?UTF-8?q?=D0=BE=D0=BD=D1=82=20https://git.sabilin.com/EventHub/EventHubB?= =?UTF-8?q?ack/issues/11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/fallback/default.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docker/fallback/default.conf b/docker/fallback/default.conf index a46c971..02897ae 100644 --- a/docker/fallback/default.conf +++ b/docker/fallback/default.conf @@ -3,6 +3,15 @@ server { root /usr/share/nginx/html; location / { + set $json 0; + if ($uri ~* "^/v1/") { set $json 1; } + if ($http_accept ~* "application/json") { set $json 1; } + + if ($json = 1) { + default_type application/json; + return 503 '{"error":"Service Unavailable","message":"EventHub is temporarily unavailable. Please try again later."}'; + } + return 503; }