fix https issue with api