SVG interativo usando

I’m up against CORS/Access-Control-Allow-Origin. I’m not familiar with how that works…

I have two sites—the Hosted Discourse site (forum.moversmindset.com) and an Apache-based Wordpress site (moversmindset.com). Note that there’s no obvious content on the Wordpress site—it’s all generating RSS feeds, serving media, etc. If you go to the domain, it’ll just send you to the forum.

I have a directory, that serves SVG-type replies to GET request. For example (not the real url) https://moversmindset.com/foo/bar.php

In my Discourse theme I’m experimenting with script code. (eventually to be a proper plugin) It calls api.decorateCooked() on particular DIVs that have some data-custom added to them. So inside the function called by decorateCooked() I’m doing what amounts to

$.get(‘https://moversmindset.com/foo/bar.php’ … bla bla blah

So I want to retrieve the SVG and then append it to the DOM. But my browser error console says:

Question:

Does that mean I have to configure CORS on the Discourse installation or over on the Apache/Wordpress?

I do have https://moversmindset.com configured as allowed in CORS on Discourse.

2 curtidas