fix to work behind a reverse proxy