some changes to get x-forwarded-for headers