[Bug] fallback сервис должен отдаваться только на фронт #11
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user