Communicating with EBS from Config page

Thats what you are supposed to do. Perform an Ajax call, and then on your EBS set the relevant Access-Control-Origins.

Exactly the same as if your viewer html was to make a call to your EBS via Ajax.