Language detection by domain breaks ajax requests over https
The problem is the CDN, which connects to Drupal via HTTP and to the client via HTTPS. Then all absolute URLs generated by Drupal have the wrong protocol. Not only this one for ajax, which is absolute because you've switched language detection to domain based. Prefix based it uses relative paths and then the protocol doesn't matter.

Normally CDN's add a header X_FORWARDED_PROTO to the request, which Drupal can use to determine the correct protocol. For this to work you have to configure the CDN as reverse proxy in settings.php.