Adding support for X-Forwarded-For header

Now the "origin" field will honor X-Forwarded-For headers for use behind things like nginx.