Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted August 11, 20231 yr I am building a page in my community where it is linked to information I have on another site. I created and API to get the information from the other site in use it in the page I am creating inside the community. The page makes requiest using jQuery ajax to get and display the data. The API alone is working when I visit the link, but from inside the community I am getting: Access to XMLHttpRequest at 'MY API LINK' from origin 'https://www.ichancycommunity.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. How can I fix this and allow my community to not block the API ?
August 11, 20231 yr Solution This is something you need to fix on the API side. By default browsers will not let you make ajax requests to other sites. On the API side, you need to adjust the headers it sends to include Access-Control-Allow-Origin headers that allow your community URL.