Hello,
I have two domains that relate to my blog, "mydomain.com" and "mydomain.it" APIs enabled in the panel work only on main domain (mydomain.com).
If I connect through the second domain (mydomain.it) APIs do not work, I find the following error in console:
XMLHttpRequest cannot load https://mydomain.com/ghost/api/v0.1/posts/?limit=all&include=tags&filter=(pa…3Atrue%2Cpage%3Afalse)&client_id=ghost-frontend&client_secret=***********. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mydomain.it' is therefore not allowed access.
I tried to add to nginx this header, but the problem does not change "add_header Access-Control-Allow-Origin *;"
Hey @ubuntutest 👋 Sorry to hear you are having problems with your CORS headers 😞 but I'm going to close this issue as we don't offer support here on Github - it's used solely for bug tracking and on-going development.
Please head over to our Slack channel where the community can better help with these sorts of things. Also, check the API docs for using the public API from an external domain, it might have some pointers for what's wrong or at least help guide your questions in Slack 😄http://api.ghost.org/docs/ajax-calls-from-an-external-website
@kevinansfield may I suggest adding the word CORS to the tittle; since when I searched for the query "CORS" in the documentation and found nothing, it confused me a bit......
Most helpful comment
@kevinansfield may I suggest adding the word CORS to the tittle; since when I searched for the query "CORS" in the documentation and found nothing, it confused me a bit......