Sorry to bother everyone. Nginx proxies everything just fine. The issue was at the upstream side. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,263391,263406#msg-263406