fix getting headers for nginx server