Locally $_SERVER['HTTP_X_PJAX']; exists, but on production it does not exist.
I detect if the request was pjax and add some special logic in the case it is true.
$isPjax = isset($_SERVER['HTTP_X_PJAX']) && $_SERVER['HTTP_X_PJAX'] === 'true';
On the left is local (php 7.4 apache), the right is production (php fpm 7.3.26). Both loaded the pages via pjax.

I assume I have to configure nginx to enable HTTP_X_PJAX to be available in the header. I googled around and nothing stuck out to me. Any help is appreciated.
It usually does not exist if you are using PHP-FPM (CLI) in your Prod. It basically depends upon the nature of the application.