Fixed x-forwarded-for implementation in server.js