Communicating with EBS from Config page

Hi all,

This seems like a truly basic question, but I have been trying for hours to get this to work. I have an extension running that provides basic basic data on the game, but this is very basic and not at all customised for the channel that the extension is hosted on.

I have read through the JWT documentation, and I have some experience using that, but I am really struggling to write the frontend code that will allow me to communicate with my EBS. I obviously can’t just use an AJAX call, because there are all kinds of problems with the Access-Control-Origin, but as far as I can see, the config.html and associated js files are served statically, so I don’t have access to the server to do a server-to-server request.

I’m sure that there’s something super basic that I have missed (am I supposed to be using PubSub? Is this what the ext.send() method is for?), but I’m building from the boilerplate, and there doesn’t seem to be a route in the backend that is referenced in the frontend for stuff like this.

Many thanks in advance,

Rich

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.

That’s it?! Thank you so much! Rats, now to find a new way of hosting…

Do you not have the ability to set headers on your current hosting provider? It’s usually strait forward to do. What language is your ebs ebsing in?

Node.JS, but I’m testing the frontend and the EBS on the same server.

Ah for that I proxy nginx in front and let nginx set the header in it’s configuration (and do my SSL termination).