22 lines
541 B
Plaintext
22 lines
541 B
Plaintext
server {
|
|
listen 80 default_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;
|
|
}
|
|
|
|
error_page 503 /503.html;
|
|
location = /503.html {
|
|
internal;
|
|
}
|
|
} |