fallback: default_type вне if-блока nginx. observer-web: Hex/deps.compile в образе, без dev-watchers в контейнере.
This commit is contained in:
@@ -2,16 +2,15 @@ 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; }
|
||||
location ~ ^/v1/ {
|
||||
default_type application/json;
|
||||
return 503 '{"error":"Service Unavailable","message":"EventHub is temporarily unavailable. Please try again later."}';
|
||||
}
|
||||
|
||||
if ($json = 1) {
|
||||
default_type application/json;
|
||||
location / {
|
||||
if ($http_accept ~* "application/json") {
|
||||
return 503 '{"error":"Service Unavailable","message":"EventHub is temporarily unavailable. Please try again later."}';
|
||||
}
|
||||
|
||||
return 503;
|
||||
}
|
||||
|
||||
@@ -19,4 +18,4 @@ server {
|
||||
location = /503.html {
|
||||
internal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user