Switching to proper AJAX requests using Nginx proxy on /api.