Improved getting x-forwarded-for from socket