fixed https redirects in some APIs