AJAX endpoint set depending on environment