Sign in to follow this  
Mathachew

Using Fusioncharts From A Cdn

Recommended Posts

I frequently release updates for my company's ASP.NET MVC sites and am in the process of including less content with each publish by hosting various files on a CDN. My charts are displaying correctly when using the SWFs from the CDN. However, when I specify a background image from the CDN, I get the following error when debugging:

 

bgSWF not loaded: The bgSWF path contains special characters like colon, which can be potentially dangerous in XSS attacks. As such, FusionCharts has not loaded the bgSWF. If you've specified the absolute path for bgSWF URL, we recommend specifying relative path under the same domain.

 

The url for the SWF and my png are the same, and I have tried making the path to the image relative, but doing so results in the browser attempting to fetch the image from the website's url rather than the CDN.

 

I'm using v3.1.1 and am loading an xml string in JS using chart.setDataXML.

 

Any thoughts?

Edited by Mathachew

Share this post


Link to post
Share on other sites

Hi,

 

This is done to stop XSS and absolute URLs are blocked. For now, you would need to use a proxy script in the website which would load the image binary in realtime from CDN URL and pass the content as response to the chart. So the chart would actually load the image from CDN howver, it would think that it loading from the application server.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this