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.
My Answer:
It seems like you are trying to access a specific variable in the $_SERVER superglobal array in PHP. If you are having trouble detecting the variable you are looking for, please provide more information or context so I can assist you better.
Rate this post
3 of 5 based on 1916 votesComments