__APP_INGRESS_HTTP__ server { listen 80 default_server; server_name ""; location = /health { access_log off; default_type text/plain; return 200 "ok\n"; } location / { return 444; } } server { listen 80; server_name __APP_EXTERNAL_HOST__; __APP_INGRESS_CHECK__ add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "DENY" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always; root /usr/share/nginx/html; index index.html; location / { try_files $uri /index.html; } location = /health { proxy_pass http://backend-web:8080/health; proxy_http_version 1.1; proxy_set_header Host __APP_EXTERNAL_AUTHORITY__; proxy_set_header X-Real-IP $remote_addr; # realip resolves one sanitized address only from an explicitly trusted socket peer. proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto __APP_EXTERNAL_SCHEME__; proxy_set_header X-Forwarded-Host ""; proxy_set_header Forwarded ""; } location = /ready { proxy_pass http://backend-web:8080/ready; proxy_http_version 1.1; proxy_set_header Host __APP_EXTERNAL_AUTHORITY__; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto __APP_EXTERNAL_SCHEME__; proxy_set_header X-Forwarded-Host ""; proxy_set_header Forwarded ""; } location /api/ { proxy_pass http://backend-web:8080; proxy_http_version 1.1; proxy_set_header Host __APP_EXTERNAL_AUTHORITY__; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Proto __APP_EXTERNAL_SCHEME__; proxy_set_header X-Forwarded-Host ""; proxy_set_header Forwarded ""; } }