The version number in every response is free information for anyone scanning for known bugs.
server_tokens off;
curl -sI https://example.com | grep -i '^server'
By default nginx puts nginx/1.24.0 into the Server header and at the bottom of its error pages. With server_tokens off only nginx remains. This is a small reduction in fingerprinting and no replacement for updates. Removing the header entirely needs the third-party headers-more module. Put the directive in the http block so it covers every server, and repeat the curl check after a reload to see the shorter header. The version also disappears from the default 404 page.
Further reading: ngx_http_core_module: server_tokens
Going deeper: ๐ Guide: AdGuard Home + Tailscale (Secure Split-Horizon DNS)