Fix url parsing when forwarding to https.