Fix port mismatch when used behind a reverse proxy