Files
notifications-api/paas-failwhale/nginx.conf
Leo Hemsted 51511450a2 add api-paas-failwhale
for use when we don't want API to serve any traffic, but paas is still
running. It's a simple nginx_buildpack app that is pushed separately,
and then two makefile commands that toggle the routes (and also
stop/start the nginx app).

For all endpoints/methods it returns a 503, with the response body.

```
{
    "status_code": 503,
    "errors": [
        {
            "error": "PlannedMaintenanceError",
            "message": "We’re performing some essential updates. Notify will be back shortly. Please check https://status.notifications.service.gov.uk/ for more details"
        }
    ]
}
```

NB: If you hit `/` it'll still return 404 - as this is defined in the
paas-proxy instance on aws.
2020-05-12 16:04:18 +01:00

32 lines
899 B
Nginx Configuration File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
worker_processes 1;
daemon off;
error_log ./error.log;
events { worker_connections 8192; }
http {
charset utf-8;
log_format cloudfoundry '$http_x_forwarded_for - $http_referer - [$time_local] "$request" $status $body_bytes_sent';
access_log ./access.log cloudfoundry;
keepalive_timeout 30;
server_tokens off;
server {
listen {{port}};
server_name localhost;
location / {
set $RESP '{';
set $RESP '${RESP} "status_code": 503,';
set $RESP '${RESP} "errors": [ {';
set $RESP '${RESP} "error": "PlannedMaintenanceError",';
set $RESP '${RESP} "message": "Were performing some essential updates. Notify will be back shortly. Please check https://status.notifications.service.gov.uk/ for more details"';
set $RESP '${RESP} } ] }';
add_header Content-Type application/json;
return 503 '$RESP';
}
}
}