Added fixes for reverse proxy.