redirect all HTTP 502 errors to HTTP 500 in nginx

This commit is contained in:
Vincent Breitmoser 2019-05-14 15:57:10 +02:00
parent 5c5be6122c
commit 59d538593a
1 changed files with 8 additions and 0 deletions

View File

@ -4,6 +4,14 @@
# To protect against DOS, we limit the size of possible uploads.
client_max_body_size 1m;
# Change all HTTP 502 errors into 500, to avoid being "marked as dead" by GnuPG
# if we ever get a spurious 502 (e.g. during a restart of hagrid).
# See https://gitlab.com/sequoia-pgp/hagrid/issues/94
error_page 502 =500 /502;
location /502 {
return 500;
}
location /vks/v1/ {
location ~ ^/vks/v1/by-email/([^/][^/])([^/][^/])([^/]*)$ {
default_type application/pgp-keys;