Add security fixes for ajax requests.