server { listen 80; server_name localhost; root /usr/share/nginx/html; index index.html; location / { try_files $uri $uri/ /index.html; } # Allow metrics.json to be fetched by the dashboard location = /metrics.json { add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Access-Control-Allow-Origin "*"; } # Health check endpoint location /health { access_log off; return 200 'OK'; add_header Content-Type text/plain; } }