Rewrote AJAX request with CORS.