Added X-Forwarded-For to pass client IP to backend

Closed previous PR and updated per rhy-jot. Also rebased of master to catch SSL change.