Fix issue with https connections when making api requests

If ssl_allowed is not set, ensure_proper_protocol will try to redirect to http, but
there is no redirect_to method defined for the api controllers