It seems NGINX drops HTTP headers with underscores silently.
The workaround is to add in the configuration the following:
underscores_in_headers on;