[Bug] fallback сервис должен отдаваться только на фронт #11

This commit is contained in:
2026-05-05 14:02:19 +03:00
parent 12a9f5a1a6
commit b85885ce83

View File

@@ -3,6 +3,15 @@ server {
root /usr/share/nginx/html; root /usr/share/nginx/html;
location / { 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; return 503;
} }