Added support for operation behind a reverse proxy supporting X-Real-IP header.