Prevent port leaking into redirects