Home › forums › Using CanvasJS › CORS error when testing demos from a file
With the OHLC financial charts, I’m getting a CORS error when I test from my own index.html file. How can I test the demos with my own files instead of using your site?
For security reasons, browsers restrict cross-origin requests. Serving JSON file from local webserver and making an AJAX call to it or serving it from CORS enabled JSON hosting service like myjson.com should work fine. Please take a look at this JSFiddle.
You must be logged in to reply to this topic.