diff --git a/deploy/nginx/templates/contract-check-http.conf.template b/deploy/nginx/templates/contract-check-http.conf.template index 78a9d48..50c542e 100644 --- a/deploy/nginx/templates/contract-check-http.conf.template +++ b/deploy/nginx/templates/contract-check-http.conf.template @@ -21,7 +21,10 @@ server { # IPv6 too — otherwise IPv6 clients fall through to nginx's stock # default.conf server (static /usr/share/nginx/html → 404s). listen [::]:80; - server_name ${NGINX_SERVER_NAME}; + # `localhost` keeps the container healthcheck (Host: localhost) on this + # server instead of falling through to nginx's stock default.conf (404). + # conf.d loads contract-check.conf first, so this name wins the conflict. + server_name ${NGINX_SERVER_NAME} localhost; location ~ ^/(healthz|readyz|metrics|api/|admin/|docs|openapi.json) { proxy_pass http://api;