Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
TheAccountant Posted August 11, 2023 Posted August 11, 2023 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 ?
Solution Rikki Posted August 11, 2023 Solution Posted August 11, 2023 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. TheAccountant 1
Recommended Posts