fix secure https connections to api