ensure https on ajax calls