Sometimes, when bad bots attack your site, it is convenient to look at the request headers to see if there is a signature that allows you to block them all easily.
Even though nginx does not offer any built-in means for that, you can use NJS module to log the request headers.