Added support for reverse proxy