Use x-forwarded-for header to get ip

When app.js sits behind a proxy, it needs to get requested IP address
from the requests x-forwarded-for header